@@ -1,14 +1,14 | |||||
1 | class CreateWikis < ActiveRecord::Migration |
|
1 | class CreateWikis < ActiveRecord::Migration | |
2 | def self.up |
|
2 | def self.up | |
3 | create_table :wikis do |t| |
|
3 | create_table :wikis do |t| | |
4 | t.column :project_id, :integer, :null => false |
|
4 | t.column :project_id, :integer, :null => false | |
5 | t.column :start_page, :string, :limit => 255, :null => false |
|
5 | t.column :start_page, :string, :limit => 255, :null => false | |
6 | t.column :status, :integer, :default => 1, :null => false |
|
6 | t.column :status, :integer, :default => 1, :null => false | |
7 |
end |
|
7 | end | |
8 | add_index :wikis, :project_id, :name => :wikis_project_id |
|
8 | add_index :wikis, :project_id, :name => :wikis_project_id | |
9 | end |
|
9 | end | |
10 |
|
10 | |||
11 | def self.down |
|
11 | def self.down | |
12 | drop_table :wikis |
|
12 | drop_table :wikis | |
13 | end |
|
13 | end | |
14 | end |
|
14 | end |
General Comments 0
You need to be logged in to leave comments.
Login now