mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
12 lines
341 B
Ruby
12 lines
341 B
Ruby
|
class CreateStepTables < ActiveRecord::Migration
|
||
|
def change
|
||
|
create_table :step_tables do |t|
|
||
|
t.integer :step_id, null: false
|
||
|
t.integer :table_id, null: false
|
||
|
end
|
||
|
add_foreign_key :step_tables, :steps
|
||
|
add_foreign_key :step_tables, :tables
|
||
|
add_index :step_tables, [:step_id, :table_id], unique: true
|
||
|
end
|
||
|
end
|