diff --git a/db/migrate/20241204214748_change_column_null_confirmation_category.rb b/db/migrate/20241204214748_change_column_null_confirmation_category.rb index c7406da..22e67d4 100644 --- a/db/migrate/20241204214748_change_column_null_confirmation_category.rb +++ b/db/migrate/20241204214748_change_column_null_confirmation_category.rb @@ -1,5 +1,10 @@ class ChangeColumnNullConfirmationCategory < ActiveRecord::Migration[7.1] def change + Category.find_or_create_by( + name: 'Flagged', + description: 'A search which has sensitive information that should be excluded from further processing.' + ) + change_column_null :confirmations, :category_id, false, Category.find_by(name: 'Flagged').id end end