add db constraints for ministere

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
This commit is contained in:
krichtof 2021-11-24 06:09:51 +01:00 committed by Christophe Robillard
parent 9341c787a1
commit b2902340af
2 changed files with 9 additions and 8 deletions

View file

@ -1,7 +1,7 @@
class CreateZones < ActiveRecord::Migration[6.1]
def change
create_table :zones do |t|
t.string :acronym
t.string :acronym, null: false, index: { unique: true }
t.string :label
t.timestamps

View file

@ -554,6 +554,14 @@ ActiveRecord::Schema.define(version: 2021_11_27_143736) do
t.index ["user_id"], name: "index_merge_logs_on_user_id"
end
create_table "zones", force: :cascade do |t|
t.string "acronym", null: false
t.string "label"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["acronym"], name: "index_zones_on_acronym", unique: true
end
create_table "module_api_cartos", id: :serial, force: :cascade do |t|
t.integer "procedure_id"
t.boolean "use_api_carto", default: false
@ -825,13 +833,6 @@ ActiveRecord::Schema.define(version: 2021_11_27_143736) do
t.index ["procedure_id"], name: "index_without_continuation_mails_on_procedure_id"
end
create_table "zones", force: :cascade do |t|
t.string "acronym"
t.string "label"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "archives_groupe_instructeurs", "archives"
add_foreign_key "archives_groupe_instructeurs", "groupe_instructeurs"