mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
11 lines
374 B
Ruby
11 lines
374 B
Ruby
class CreateSampleMyModules < ActiveRecord::Migration
|
|
def change
|
|
create_table :sample_my_modules do |t|
|
|
t.integer :sample_id, null: false
|
|
t.integer :my_module_id, null: false
|
|
end
|
|
add_foreign_key :sample_my_modules, :samples
|
|
add_foreign_key :sample_my_modules, :my_modules
|
|
add_index :sample_my_modules, [:sample_id, :my_module_id]
|
|
end
|
|
end
|