Add unique index on parks#code
This commit is contained in:
@@ -8,5 +8,7 @@ class CreateParks < ActiveRecord::Migration[8.0]
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :parks, :code, unique: true
|
||||
end
|
||||
end
|
||||
|
||||
1
db/schema.rb
generated
1
db/schema.rb
generated
@@ -18,5 +18,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_10_08_044109) do
|
||||
t.json "properties", default: {}, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["code"], name: "index_parks_on_code", unique: true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user