mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-08 16:40:16 +08:00
12 lines
327 B
Ruby
12 lines
327 B
Ruby
|
class CreateStepAssets < ActiveRecord::Migration
|
||
|
def change
|
||
|
create_table :step_assets do |t|
|
||
|
t.integer :step_id, null: false
|
||
|
t.integer :asset_id, null: false
|
||
|
end
|
||
|
add_foreign_key :step_assets, :steps
|
||
|
add_foreign_key :step_assets, :assets
|
||
|
add_index :step_assets, [:step_id, :asset_id]
|
||
|
end
|
||
|
end
|