Mercurial > hg > soundsoftware-site
comparison db/migrate/.svn/text-base/029_create_wiki_contents.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 CreateWikiContents < ActiveRecord::Migration | |
2 def self.up | |
3 create_table :wiki_contents do |t| | |
4 t.column :page_id, :integer, :null => false | |
5 t.column :author_id, :integer | |
6 t.column :text, :text | |
7 t.column :comments, :string, :limit => 255, :default => "" | |
8 t.column :updated_on, :datetime, :null => false | |
9 t.column :version, :integer, :null => false | |
10 end | |
11 add_index :wiki_contents, :page_id, :name => :wiki_contents_page_id | |
12 | |
13 create_table :wiki_content_versions do |t| | |
14 t.column :wiki_content_id, :integer, :null => false | |
15 t.column :page_id, :integer, :null => false | |
16 t.column :author_id, :integer | |
17 t.column :data, :binary | |
18 t.column :compression, :string, :limit => 6, :default => "" | |
19 t.column :comments, :string, :limit => 255, :default => "" | |
20 t.column :updated_on, :datetime, :null => false | |
21 t.column :version, :integer, :null => false | |
22 end | |
23 add_index :wiki_content_versions, :wiki_content_id, :name => :wiki_content_versions_wcid | |
24 end | |
25 | |
26 def self.down | |
27 drop_table :wiki_contents | |
28 drop_table :wiki_content_versions | |
29 end | |
30 end |