scinote-web/db/migrate/20150715134133_create_connections.rb

11 lines
333 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class CreateConnections < ActiveRecord::Migration[4.2]
2016-02-12 23:52:43 +08:00
def change
create_table :connections do |t|
t.integer :input_id, null: false
t.integer :output_id, null: false
end
add_foreign_key :connections, :my_modules, column: :input_id
add_foreign_key :connections, :my_modules, column: :output_id
end
end