Skip to content

Commit

Permalink
fix(data): add missing foreign key on production between champs.dossi…
Browse files Browse the repository at this point in the history
…er_id and dossier.id, use validate: false to delay validation
  • Loading branch information
mfo committed Aug 26, 2024
1 parent 8e7e8d9 commit ccddf88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class AddMissingIndexChampsToDossier < ActiveRecord::Migration[7.0]
def change
add_foreign_key :champs, :dossiers, if_not_exists: true, validate: false
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_07_29_160650) do
ActiveRecord::Schema[7.0].define(version: 2024_08_26_130121) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_buffercache"
enable_extension "pg_stat_statements"
Expand Down

0 comments on commit ccddf88

Please sign in to comment.