To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / db / migrate / 045_create_boards.rb @ 441:cbce1fd3b1b7

History | View | Annotate | Download (607 Bytes)

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