Class: RocketCmsCreateSeos

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/rocket_cms/templates/migration_seos.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/rocket_cms/templates/migration_seos.rb', line 2

def change
  create_table :seos do |t|
    t.boolean :enabled, default: true, null: false
    t.integer :seoable_id
    t.string  :seoable_type
    RocketCMS::Migration.seo_fields(t)
    t.timestamps
  end

  add_index :seos, [:seoable_id, :seoable_type], unique: true
end