Class: CreateSeoMeta

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/active_seo/templates/migration/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/active_seo/templates/migration/migration.rb', line 2

def change
  create_table :seo_meta do |t|
    t.string  :title
    t.text    :description
    t.text    :keywords
    t.boolean :noindex,      default: false
    t.boolean :nofollow,     default: false
    t.integer :seoable_id,   null: false
    t.string  :seoable_type, null: false

    t.timestamps
  end

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