Sha256: 123f9827de854916f20ec11100e43289b4ac7bcf697cf06ff8e83b6b94103bdf
Contents?: true
Size: 1.82 KB
Versions: 14
Compression:
Stored size: 1.82 KB
Contents
class CreateEffectivePages < ActiveRecord::Migration[4.2] def self.up create_table <%= @pages_table_name %> do |t| t.integer :page_banner_id 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_group t.string :menu_title t.string :menu_url t.integer :menu_position t.boolean :banner, default: false t.boolean :banner_random, default: false t.datetime :updated_at t.datetime :created_at end add_index <%= @pages_table_name %>, :slug, :unique => true create_table <%= @page_banners_table_name %> do |t| t.string :name t.string :caption t.timestamps end add_index <%= @page_banners_table_name %>, :name, :unique => true create_table <%= @page_sections_table_name %> do |t| t.string :name t.text :hint t.string :title t.string :caption t.string :link_label t.string :link_url t.datetime :updated_at t.datetime :created_at end add_index <%= @page_sections_table_name %>, :name, :unique => true create_table <%= @carousel_items_table_name %> do |t| t.string :carousel t.string :title t.string :caption t.string :link_label t.string :link_url t.integer :position t.timestamps end end def self.down drop_table <%= @pages_table_name %> drop_table <%= @page_banners_table_name %> drop_table <%= @page_sections_table_name %> drop_table <%= @carousel_items_table_name %> end end
Version data entries
14 entries across 14 versions & 1 rubygems