summaryrefslogtreecommitdiffstats
path: root/db/migrate/027_create_wikis.rb
blob: c40481488b71585d530f1c475e91ff5ba27331b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CreateWikis < ActiveRecord::Migration[4.2]
  def self.up
    create_table :wikis do |t|
      t.column :project_id, :integer, :null => false
      t.column :start_page, :string,  :limit => 255, :null => false
      t.column :status, :integer, :default => 1, :null => false
    end
    add_index :wikis, :project_id, :name => :wikis_project_id
  end

  def self.down
    drop_table :wikis
  end
end