class CreateEffectivePages < ActiveRecord::Migration[4.2] def self.up create_table <%= @pages_table_name %> do |t| t.string :title t.string :meta_description t.boolean :draft, default: false t.string :layout, default: 'application' t.string :template t.string :slug t.boolean :authenticate_user, default: false t.integer :roles_mask, default: 0 t.integer :menu_parent_id t.boolean :menu, default: false t.string :menu_name t.string :menu_title t.string :menu_url t.integer :menu_position t.datetime :updated_at t.datetime :created_at end add_index <%= @pages_table_name %>, :slug, :unique => true end def self.down drop_table <%= @pages_table_name %> end end