Add external_id to champs

This commit is contained in:
Paul Chavard 2021-01-14 23:53:02 +01:00
parent d41cef4c23
commit 09a3cacd88
34 changed files with 39 additions and 1 deletions

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -12,6 +12,7 @@
# updated_at :datetime # updated_at :datetime
# dossier_id :integer # dossier_id :integer
# etablissement_id :integer # etablissement_id :integer
# external_id :string
# parent_id :bigint # parent_id :bigint
# type_de_champ_id :integer # type_de_champ_id :integer
# #

View file

@ -0,0 +1,5 @@
class AddExternalIdToChamps < ActiveRecord::Migration[6.0]
def change
add_column :champs, :external_id, :string
end
end

View file

@ -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.define(version: 2021_01_13_150013) do ActiveRecord::Schema.define(version: 2021_01_14_224721) 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 "plpgsql" enable_extension "plpgsql"
@ -144,6 +144,7 @@ ActiveRecord::Schema.define(version: 2021_01_13_150013) do
t.bigint "parent_id" t.bigint "parent_id"
t.integer "row" t.integer "row"
t.jsonb "data" t.jsonb "data"
t.string "external_id"
t.index ["dossier_id"], name: "index_champs_on_dossier_id" t.index ["dossier_id"], name: "index_champs_on_dossier_id"
t.index ["parent_id"], name: "index_champs_on_parent_id" t.index ["parent_id"], name: "index_champs_on_parent_id"
t.index ["private"], name: "index_champs_on_private" t.index ["private"], name: "index_champs_on_private"