Add primary key to migration
This commit is contained in:
parent
caf357a84d
commit
c70290d6d5
2 changed files with 2 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ class AddUpdatesTable < ActiveRecord::Migration[7.0]
|
|||
def change
|
||||
create_table :app_updates, id: false do |t|
|
||||
t.string :update_type, null: false
|
||||
t.datetime :updated_at, null: false, unique: true
|
||||
t.datetime :updated_at, null: false, unique: true, primary_key: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,9 +17,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_26_030358) do
|
|||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "app_updates", id: false, force: :cascade do |t|
|
||||
create_table "app_updates", primary_key: "updated_at", id: :datetime, force: :cascade do |t|
|
||||
t.string "update_type", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Reference in a new issue