move foodsoft_wiki db migration to plugin

This commit is contained in:
wvengen 2013-10-30 09:43:38 +01:00
parent de948d7692
commit c3068c8d51
2 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1,23 @@
class CreatePages < ActiveRecord::Migration
def self.up
create_table :pages do |t|
t.string :title
t.text :body
t.string :permalink
t.integer :lock_version, :default => 0
t.integer :updated_by
t.integer :redirect
t.integer :parent_id
t.timestamps
end
add_index :pages, :title
add_index :pages, :permalink
Page.create_versioned_table # Automaticly creates pages_versions table
end
def self.down
drop_table :pages
Page.drop_versioned_table
end
end