scinote-web/db/migrate/20150715134133_create_connections.rb
2016-02-12 16:52:43 +01:00

11 lines
328 B
Ruby

class CreateConnections < ActiveRecord::Migration
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