14 行
366 B
Ruby
14 行
366 B
Ruby
class CreateSubmissions < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :submissions do |t|
|
|
t.references :user, null: false, foreign_key: true
|
|
t.string :category, null: false
|
|
t.bigint :target_id
|
|
t.integer :target_version_no
|
|
t.text :content, null: false
|
|
t.timestamps
|
|
t.index [:created_at, :id]
|
|
end
|
|
end
|
|
end
|