scinote-web/db/migrate/20150713071921_create_projects.rb

14 lines
348 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class CreateProjects < ActiveRecord::Migration[4.2]
2016-02-12 23:52:43 +08:00
def change
create_table :projects do |t|
t.string :name, null: false
t.column :visibility, :integer, null: false, default: 0
t.datetime :due_date
2017-01-26 23:30:31 +08:00
t.integer :team_id, null: false
2016-02-12 23:52:43 +08:00
t.timestamps null: false
end
2017-01-26 23:30:31 +08:00
add_foreign_key :projects, :teams
2016-02-12 23:52:43 +08:00
end
end