7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/cortex_reaver/migrations/005_projects.rb', line 7
def up
unless table_exists? :projects
create_table :projects do
primary_key :id
foreign_key :user_id, :table => :users
index :user_id
varchar :name, :null => false, :unique => true, :index => true
text :title, :null => false
text :description, :null => false, :default => ''
text :body, :default => ''
text :body_cache, :default => ''
integer :comment_count, :null => false, :default => 0
datetime :created_on, :null => false
datetime :updated_on, :null => false
end
end
end
|