scinote-web/db/migrate/20150713071921_create_projects.rb
2017-06-30 10:23:28 +02:00

13 lines
348 B
Ruby

class CreateProjects < ActiveRecord::Migration[4.2]
def change
create_table :projects do |t|
t.string :name, null: false
t.column :visibility, :integer, null: false, default: 0
t.datetime :due_date
t.integer :team_id, null: false
t.timestamps null: false
end
add_foreign_key :projects, :teams
end
end