correctif(deploy): separe les migration d'ajout de colonne et de reference

This commit is contained in:
Martin 2023-10-09 16:34:22 +02:00
parent def659e599
commit 28c5a5b790
3 changed files with 10 additions and 5 deletions

View file

@ -2,10 +2,7 @@ class AddContextToExports < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
safety_assured do
add_reference :exports, :instructeur, foreign_key: true, null: true, default: nil, index: { algorithm: :concurrently }
end
add_column :exports, :dossiers_count, :integer, null: true, default: nil
end
end

View file

@ -0,0 +1,8 @@
class AddReferenceToExportsInstructeur < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
safety_assured do
add_reference :exports, :instructeur, foreign_key: true, null: true, default: nil, index: { algorithm: :concurrently }
end
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_10_09_070354) do
ActiveRecord::Schema[7.0].define(version: 2023_10_09_143331) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"