foodsoft/db/migrate/20090325175756_create_pages.rb

21 lines
422 B
Ruby
Raw Normal View History

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
2009-05-15 17:32:45 +02:00
t.integer :updated_by
t.timestamps
end
2009-05-15 17:32:45 +02:00
Page.create_versioned_table # Automaticly creates pages_versions table
end
def self.down
drop_table :pages
2009-05-15 17:32:45 +02:00
Page.drop_versioned_table
end
end