@@ -1,30 +1,30 | |||
|
1 | 1 | class CreateWikiContents < ActiveRecord::Migration |
|
2 | 2 | def self.up |
|
3 | 3 | create_table :wiki_contents do |t| |
|
4 | 4 | t.column :page_id, :integer, :null => false |
|
5 | 5 | t.column :author_id, :integer |
|
6 | 6 | t.column :text, :text |
|
7 | 7 | t.column :comments, :string, :limit => 255, :default => "" |
|
8 | 8 | t.column :updated_on, :datetime, :null => false |
|
9 | 9 | t.column :version, :integer, :null => false |
|
10 | 10 | end |
|
11 | 11 | add_index :wiki_contents, :page_id, :name => :wiki_contents_page_id |
|
12 | ||
|
12 | ||
|
13 | 13 | create_table :wiki_content_versions do |t| |
|
14 | 14 | t.column :wiki_content_id, :integer, :null => false |
|
15 | 15 | t.column :page_id, :integer, :null => false |
|
16 | 16 | t.column :author_id, :integer |
|
17 | 17 | t.column :data, :binary |
|
18 | 18 | t.column :compression, :string, :limit => 6, :default => "" |
|
19 | 19 | t.column :comments, :string, :limit => 255, :default => "" |
|
20 | 20 | t.column :updated_on, :datetime, :null => false |
|
21 | 21 | t.column :version, :integer, :null => false |
|
22 | 22 | end |
|
23 | 23 | add_index :wiki_content_versions, :wiki_content_id, :name => :wiki_content_versions_wcid |
|
24 | 24 | end |
|
25 | 25 | |
|
26 | 26 | def self.down |
|
27 | 27 | drop_table :wiki_contents |
|
28 | 28 | drop_table :wiki_content_versions |
|
29 | 29 | end |
|
30 | 30 | end |
General Comments 0
You need to be logged in to leave comments.
Login now