scinote-web/db/migrate/20150715142929_create_result_assets.rb

11 lines
298 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
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