Mercurial > hg > soundsoftware-site
comparison db/migrate/.svn/text-base/045_create_boards.rb.svn-base @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:513646585e45 |
---|---|
1 class CreateBoards < ActiveRecord::Migration | |
2 def self.up | |
3 create_table :boards do |t| | |
4 t.column :project_id, :integer, :null => false | |
5 t.column :name, :string, :default => "", :null => false | |
6 t.column :description, :string | |
7 t.column :position, :integer, :default => 1 | |
8 t.column :topics_count, :integer, :default => 0, :null => false | |
9 t.column :messages_count, :integer, :default => 0, :null => false | |
10 t.column :last_message_id, :integer | |
11 end | |
12 add_index :boards, [:project_id], :name => :boards_project_id | |
13 end | |
14 | |
15 def self.down | |
16 drop_table :boards | |
17 end | |
18 end |