Sha256: 4548534774144992498ebb733a053079d5e2c02da7d1f212feb56ee42180ba85

Contents?: true

Size: 557 Bytes

Versions: 9

Compression:

Stored size: 557 Bytes

Contents

class CreateUniqueKey < ActiveRecord::Migration
  def change
    create_table :unique_keys do |t|
      t.references  :viewable, polymorphic: true, index: true
      t.text        :view_path, null: false
      t.text        :name,      null: false
      t.integer     :position,  null: false
      t.string      :locale,    null: false

      t.timestamps null: false
    end

    add_index(
      :unique_keys,
      [ :viewable_type, :view_path, :name, :position, :locale ],
      { unique: true, name: 'index_unique_keys_on_unique_key' }
    )
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_admin_cms-0.1.1 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.9 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.7 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.6 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.5 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.4 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.3 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.2 db/migrate/20151226023652_create_unique_key.rb
rails_admin_cms-0.0.1 db/migrate/20151226023652_create_unique_key.rb