Sha256: 8b28f685293dfe3df9a05eddd1727227563d1467ee3eef9fe23c977e6d706759
Contents?: true
Size: 543 Bytes
Versions: 16
Compression:
Stored size: 543 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
16 entries across 16 versions & 1 rubygems