提交 f505f23c 编写于 作者: M Matthew Draper 提交者: GitHub

Merge pull request #30222 from kamipo/respect_pk_type

Use `references` to respect primary key type in active storage tables
......@@ -13,14 +13,12 @@ def change
end
create_table :active_storage_attachments do |t|
t.string :name, null: false
t.string :record_type, null: false
t.integer :record_id, null: false
t.integer :blob_id, null: false
t.string :name, null: false
t.references :record, null: false, polymorphic: true, index: false
t.references :blob, null: false
t.datetime :created_at, null: false
t.index :blob_id
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册