Sha256: 70a9c762075820058fccfab354756ca917cc31fb384fcdc54e93b84577e6f65c

Contents?: true

Size: 1.37 KB

Versions: 64

Compression:

Stored size: 1.37 KB

Contents

# This migration comes from dm_core (originally 20140529164730)
class CreateCustomFields < ActiveRecord::Migration
  def change
    create_table :core_custom_field_defs do |t|
      t.references    :owner, polymorphic: true
      t.string        :name
      t.string        :field_type
      t.integer       :row_order
      t.boolean       :required,        default: false
      t.string        :properties,      limit: 2048
      t.timestamps null: true
      t.integer       :account_id
    end

    add_index :core_custom_field_defs, :account_id
    add_index :core_custom_field_defs, [:owner_id, :owner_type]

    create_table :core_custom_field_def_translations, force: true do |t|
      t.integer     :core_custom_field_def_id
      t.string      :locale
      t.string      :label
      t.text        :description
      t.datetime    :created_at
      t.datetime    :updated_at
    end

    add_index :core_custom_field_def_translations, [:core_custom_field_def_id], name: 'core_custom_field_def_translations_index'

    create_table :core_custom_fields do |t|
      t.references    :owner, polymorphic: true
      t.integer       :custom_field_def_id
      t.string        :field_data,     limit: 4096
      t.timestamps null: true
      t.integer       :account_id
    end

    add_index :core_custom_fields, :account_id
    add_index :core_custom_fields, [:owner_id, :owner_type]
  end
end

Version data entries

64 entries across 64 versions & 4 rubygems

Version Path
dm_newsletter-4.2.3.10 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_forum-4.2.3.10 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_event-4.2.3.10 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_cms-4.2.3.10 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_newsletter-4.2.3.9 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_forum-4.2.3.9 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_event-4.2.3.9 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_cms-4.2.3.9 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_newsletter-4.2.3.8 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_forum-4.2.3.8 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_event-4.2.3.8 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_cms-4.2.3.8 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_newsletter-4.2.3.7 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_forum-4.2.3.7 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_event-4.2.3.7 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_cms-4.2.3.7 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_newsletter-4.2.3.6 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_forum-4.2.3.6 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_event-4.2.3.6 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb
dm_cms-4.2.3.6 spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb