2009-03-25 19:54:04 +01:00
|
|
|
class CreatePages < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :pages do |t|
|
|
|
|
t.string :title
|
|
|
|
t.text :body
|
|
|
|
t.string :permalink
|
2009-05-15 13:54:42 +02:00
|
|
|
t.integer :lock_version, :default => 0
|
2009-05-15 17:32:45 +02:00
|
|
|
t.integer :updated_by
|
2009-06-11 23:51:26 +02:00
|
|
|
t.integer :redirect
|
2009-03-25 19:54:04 +01:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
2009-05-15 17:32:45 +02:00
|
|
|
|
|
|
|
Page.create_versioned_table # Automaticly creates pages_versions table
|
2009-03-25 19:54:04 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :pages
|
2009-05-15 17:32:45 +02:00
|
|
|
Page.drop_versioned_table
|
2009-03-25 19:54:04 +01:00
|
|
|
end
|
|
|
|
end
|