class CreateEffectiveRegions < ActiveRecord::Migration[4.2] def self.up create_table <%= @regions_table_name %> do |t| t.string :regionable_type t.integer :regionable_id t.string :title t.text :content t.text :snippets t.datetime :updated_at t.datetime :created_at end add_index <%= @regions_table_name %>, [:regionable_type, :regionable_id] add_index <%= @regions_table_name %>, :regionable_id end def self.down drop_table <%= @regions_table_name %> end end