diff --git a/app/models/champ.rb b/app/models/champ.rb index 61930b3ab..5f7f66e44 100644 --- a/app/models/champ.rb +++ b/app/models/champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/address_champ.rb b/app/models/champs/address_champ.rb index 3e7870b50..c6298b99a 100644 --- a/app/models/champs/address_champ.rb +++ b/app/models/champs/address_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/annuaire_education_champ.rb b/app/models/champs/annuaire_education_champ.rb index 22141ca17..727a5a4bf 100644 --- a/app/models/champs/annuaire_education_champ.rb +++ b/app/models/champs/annuaire_education_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/carte_champ.rb b/app/models/champs/carte_champ.rb index 1e91e529e..7e3795925 100644 --- a/app/models/champs/carte_champ.rb +++ b/app/models/champs/carte_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/checkbox_champ.rb b/app/models/champs/checkbox_champ.rb index 82f009577..a500abb59 100644 --- a/app/models/champs/checkbox_champ.rb +++ b/app/models/champs/checkbox_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/civilite_champ.rb b/app/models/champs/civilite_champ.rb index ace32a968..cf5316ea0 100644 --- a/app/models/champs/civilite_champ.rb +++ b/app/models/champs/civilite_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/commune_champ.rb b/app/models/champs/commune_champ.rb index 349221cf1..4477da8e3 100644 --- a/app/models/champs/commune_champ.rb +++ b/app/models/champs/commune_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/date_champ.rb b/app/models/champs/date_champ.rb index 2e09bd29d..db0644ed7 100644 --- a/app/models/champs/date_champ.rb +++ b/app/models/champs/date_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/datetime_champ.rb b/app/models/champs/datetime_champ.rb index f7f5bd496..8899811b1 100644 --- a/app/models/champs/datetime_champ.rb +++ b/app/models/champs/datetime_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/decimal_number_champ.rb b/app/models/champs/decimal_number_champ.rb index f574c07ca..1bc48db23 100644 --- a/app/models/champs/decimal_number_champ.rb +++ b/app/models/champs/decimal_number_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/departement_champ.rb b/app/models/champs/departement_champ.rb index ac5c89633..b9b68db43 100644 --- a/app/models/champs/departement_champ.rb +++ b/app/models/champs/departement_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/dossier_link_champ.rb b/app/models/champs/dossier_link_champ.rb index 866f70197..55c8763e9 100644 --- a/app/models/champs/dossier_link_champ.rb +++ b/app/models/champs/dossier_link_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/drop_down_list_champ.rb b/app/models/champs/drop_down_list_champ.rb index 92f52e3f1..bf9e1b70d 100644 --- a/app/models/champs/drop_down_list_champ.rb +++ b/app/models/champs/drop_down_list_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/email_champ.rb b/app/models/champs/email_champ.rb index c8a1949b0..acdd6568c 100644 --- a/app/models/champs/email_champ.rb +++ b/app/models/champs/email_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/engagement_champ.rb b/app/models/champs/engagement_champ.rb index 986623136..bdd6ff0a6 100644 --- a/app/models/champs/engagement_champ.rb +++ b/app/models/champs/engagement_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/explication_champ.rb b/app/models/champs/explication_champ.rb index d20108393..bac3d0aff 100644 --- a/app/models/champs/explication_champ.rb +++ b/app/models/champs/explication_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/header_section_champ.rb b/app/models/champs/header_section_champ.rb index 0ff9c7659..2cc24c888 100644 --- a/app/models/champs/header_section_champ.rb +++ b/app/models/champs/header_section_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/iban_champ.rb b/app/models/champs/iban_champ.rb index 71ba23281..df94eac66 100644 --- a/app/models/champs/iban_champ.rb +++ b/app/models/champs/iban_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/integer_number_champ.rb b/app/models/champs/integer_number_champ.rb index 8272800e1..5187db3d9 100644 --- a/app/models/champs/integer_number_champ.rb +++ b/app/models/champs/integer_number_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/linked_drop_down_list_champ.rb b/app/models/champs/linked_drop_down_list_champ.rb index f7022d727..e013d1c24 100644 --- a/app/models/champs/linked_drop_down_list_champ.rb +++ b/app/models/champs/linked_drop_down_list_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/multiple_drop_down_list_champ.rb b/app/models/champs/multiple_drop_down_list_champ.rb index 87429b0ee..899dd0159 100644 --- a/app/models/champs/multiple_drop_down_list_champ.rb +++ b/app/models/champs/multiple_drop_down_list_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/number_champ.rb b/app/models/champs/number_champ.rb index fa2ec9b47..d43a6d3df 100644 --- a/app/models/champs/number_champ.rb +++ b/app/models/champs/number_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/pays_champ.rb b/app/models/champs/pays_champ.rb index 634391a31..2eb3eee76 100644 --- a/app/models/champs/pays_champ.rb +++ b/app/models/champs/pays_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/phone_champ.rb b/app/models/champs/phone_champ.rb index 15002fe60..baa032d5b 100644 --- a/app/models/champs/phone_champ.rb +++ b/app/models/champs/phone_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/piece_justificative_champ.rb b/app/models/champs/piece_justificative_champ.rb index 245750c01..5076f963a 100644 --- a/app/models/champs/piece_justificative_champ.rb +++ b/app/models/champs/piece_justificative_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/region_champ.rb b/app/models/champs/region_champ.rb index 255e4abb2..5fcbe8934 100644 --- a/app/models/champs/region_champ.rb +++ b/app/models/champs/region_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/repetition_champ.rb b/app/models/champs/repetition_champ.rb index b07fd0958..75451686b 100644 --- a/app/models/champs/repetition_champ.rb +++ b/app/models/champs/repetition_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/siret_champ.rb b/app/models/champs/siret_champ.rb index b9b5b27b5..8b7347235 100644 --- a/app/models/champs/siret_champ.rb +++ b/app/models/champs/siret_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/text_champ.rb b/app/models/champs/text_champ.rb index 1376cce48..9c48ba036 100644 --- a/app/models/champs/text_champ.rb +++ b/app/models/champs/text_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/textarea_champ.rb b/app/models/champs/textarea_champ.rb index 028950a5f..39570d81a 100644 --- a/app/models/champs/textarea_champ.rb +++ b/app/models/champs/textarea_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/titre_identite_champ.rb b/app/models/champs/titre_identite_champ.rb index 982ae7ae7..1d74c3245 100644 --- a/app/models/champs/titre_identite_champ.rb +++ b/app/models/champs/titre_identite_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/app/models/champs/yes_no_champ.rb b/app/models/champs/yes_no_champ.rb index fc8346cfb..293beaba2 100644 --- a/app/models/champs/yes_no_champ.rb +++ b/app/models/champs/yes_no_champ.rb @@ -6,6 +6,7 @@ # data :jsonb # fetch_external_data_exceptions :string is an Array # private :boolean default(FALSE), not null +# rebased_at :datetime # row :integer # type :string # value :string diff --git a/db/migrate/20211013131241_add_rebased_at_to_champs.rb b/db/migrate/20211013131241_add_rebased_at_to_champs.rb new file mode 100644 index 000000000..209b37992 --- /dev/null +++ b/db/migrate/20211013131241_add_rebased_at_to_champs.rb @@ -0,0 +1,5 @@ +class AddRebasedAtToChamps < ActiveRecord::Migration[6.1] + def change + add_column :champs, :rebased_at, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index b8c245f1c..f5a4cc1ba 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_10_20_104237) do +ActiveRecord::Schema.define(version: 2021_10_20_114237) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -190,6 +190,7 @@ ActiveRecord::Schema.define(version: 2021_10_20_104237) do t.string "external_id" t.string "fetch_external_data_exceptions", array: true t.jsonb "value_json" + t.datetime "rebased_at" t.index ["dossier_id"], name: "index_champs_on_dossier_id" t.index ["etablissement_id"], name: "index_champs_on_etablissement_id" t.index ["parent_id"], name: "index_champs_on_parent_id"