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

14 lines
359 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
class CreateProjects < ActiveRecord::Migration
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 :organization_id, null: false
t.timestamps null: false
end
add_foreign_key :projects, :organizations
end
end