mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
11 lines
298 B
Ruby
11 lines
298 B
Ruby
|
class CreateResultAssets < ActiveRecord::Migration
|
||
|
def change
|
||
|
create_table :result_assets do |t|
|
||
|
t.integer :result_id, null: false
|
||
|
t.integer :asset_id, null: false
|
||
|
end
|
||
|
add_foreign_key :result_assets, :assets
|
||
|
add_index :result_assets, [:result_id, :asset_id]
|
||
|
end
|
||
|
end
|