To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 05 / 05e06f37663175a7e86aab01c766edf25f24a007.svn-base @ 912:5e80956cc792
History | View | Annotate | Download (1.1 KB)
| 1 | 909:cbb26bc654de | Chris | 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 |