Merge pull request #9577 from mfo/US-fixmigration
correctif(deploy): separe les migration d'ajout de colonne et de reference
This commit is contained in:
commit
dfdf5b2e51
3 changed files with 10 additions and 5 deletions
|
@ -2,10 +2,7 @@ class AddContextToExports < ActiveRecord::Migration[7.0]
|
||||||
disable_ddl_transaction!
|
disable_ddl_transaction!
|
||||||
|
|
||||||
def change
|
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
|
add_column :exports, :dossiers_count, :integer, null: true, default: nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pgcrypto"
|
enable_extension "pgcrypto"
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
Loading…
Add table
Reference in a new issue