diff --git a/db/migrate/20211127133549_create_zones.rb b/db/migrate/20211127133549_create_zones.rb index d98b30b2d..f3a54c108 100644 --- a/db/migrate/20211127133549_create_zones.rb +++ b/db/migrate/20211127133549_create_zones.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 6c8fad2c6..64a46604c 100644 --- a/db/schema.rb +++ b/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" 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"