add db constraints for ministere
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
This commit is contained in:
parent
9341c787a1
commit
b2902340af
2 changed files with 9 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
class CreateZones < ActiveRecord::Migration[6.1]
|
class CreateZones < ActiveRecord::Migration[6.1]
|
||||||
def change
|
def change
|
||||||
create_table :zones do |t|
|
create_table :zones do |t|
|
||||||
t.string :acronym
|
t.string :acronym, null: false, index: { unique: true }
|
||||||
t.string :label
|
t.string :label
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
|
|
15
db/schema.rb
15
db/schema.rb
|
@ -554,6 +554,14 @@ ActiveRecord::Schema.define(version: 2021_11_27_143736) do
|
||||||
t.index ["user_id"], name: "index_merge_logs_on_user_id"
|
t.index ["user_id"], name: "index_merge_logs_on_user_id"
|
||||||
end
|
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|
|
create_table "module_api_cartos", id: :serial, force: :cascade do |t|
|
||||||
t.integer "procedure_id"
|
t.integer "procedure_id"
|
||||||
t.boolean "use_api_carto", default: false
|
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"
|
t.index ["procedure_id"], name: "index_without_continuation_mails_on_procedure_id"
|
||||||
end
|
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 "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
||||||
add_foreign_key "archives_groupe_instructeurs", "archives"
|
add_foreign_key "archives_groupe_instructeurs", "archives"
|
||||||
add_foreign_key "archives_groupe_instructeurs", "groupe_instructeurs"
|
add_foreign_key "archives_groupe_instructeurs", "groupe_instructeurs"
|
||||||
|
|
Loading…
Reference in a new issue