chore(schema): dossiers#for_procedure_preview not nullable

This commit is contained in:
Colin Darie 2023-11-10 15:41:30 +01:00
parent 49d6373330
commit 06a8684bfd
3 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,5 @@
class AlterDossiersForProcedurePreviewNotNullable < ActiveRecord::Migration[7.0]
def change
add_check_constraint :dossiers, "for_procedure_preview IS NOT NULL", name: "dossiers_for_procedure_preview_null", validate: false
end
end

View file

@ -0,0 +1,7 @@
class ValidateAlterDossiersForProcedurePreviewNotNullable < ActiveRecord::Migration[7.0]
def change
validate_check_constraint :dossiers, name: "dossiers_for_procedure_preview_null"
change_column_null :dossiers, :for_procedure_preview, false, false
remove_check_constraint :dossiers, name: "dossiers_for_procedure_preview_null"
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_11_07_150217) do
ActiveRecord::Schema[7.0].define(version: 2023_11_10_135533) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@ -402,7 +402,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_11_07_150217) do
t.datetime "en_construction_at", precision: 6
t.datetime "en_construction_close_to_expiration_notice_sent_at", precision: 6
t.datetime "en_instruction_at", precision: 6
t.boolean "for_procedure_preview", default: false
t.boolean "for_procedure_preview", default: false, null: false
t.boolean "forced_groupe_instructeur", default: false, null: false
t.bigint "groupe_instructeur_id"
t.datetime "groupe_instructeur_updated_at", precision: 6