Sha256: c4ad4b27a270536f8bdceec854f9120f35b4a303daaa1271526e7e105da13c35

Contents?: true

Size: 551 Bytes

Versions: 45

Compression:

Stored size: 551 Bytes

Contents

class CreateEcomCoreEquipmentCategories < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_equipment_categories do |t|
      t.string :name, null: false
      t.string :description
      t.references :equipment_type,
                   null: false,
                   index: { name: 'et_on_ecec_indx' },
                   foreign_key: { to_table: :ecom_core_resource_types }

      t.timestamps
    end

    add_index :ecom_core_equipment_categories, %i[name equipment_type_id], unique: true, name: 'ecec_name_et_indx'
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
ecom_core-1.2.11 db/migrate/20200315150500_create_ecom_core_equipment_categories.rb
ecom_core-1.2.10 db/migrate/20200315150500_create_ecom_core_equipment_categories.rb
ecom_core-1.2.9 db/migrate/20200315150500_create_ecom_core_equipment_categories.rb
ecom_core-1.2.7 db/migrate/20200315150500_create_ecom_core_equipment_categories.rb
ecom_core-1.2.6 db/migrate/20200315150500_create_ecom_core_equipment_categories.rb