Sha256: adead2c721bfa4877ef180e78bd5b97356e112117189f11ebba04f942c4c19f7
Contents?: true
Size: 542 Bytes
Versions: 44
Compression:
Stored size: 542 Bytes
Contents
class CreatePages < ActiveRecord::Migration def self.up create_table :pages do |t| t.string :title t.text :description t.text :body t.boolean :for_blog, default: false t.datetime :published_at t.timestamps end add_index :pages, :published_at Page.create_translation_table! :title => :string, :short_title => :string, :description => :text, :body => :text end def self.down drop_table :pages Page.drop_translation_table! remove_index :pages, :published_at end end
Version data entries
44 entries across 44 versions & 1 rubygems