Sha256: 5580e6f02242d8edf93ca11700bca6d4450db5db9d3cf29e7556ed93c7e81715

Contents?: true

Size: 678 Bytes

Versions: 10

Compression:

Stored size: 678 Bytes

Contents

class CreateComeeCoreProducts < ActiveRecord::Migration[7.0]
  def change
    create_table :comee_core_products do |t|
      t.string :code, null: false
      t.string :name, null: false
      t.string :description
      t.boolean :leaf, null: false, default: true
      t.string :ancestry
      t.jsonb :preferred_units, null: false, default: []
      t.references :source,
                   null: true,
                   index: {name: "source_on_ccp_indx"},
                   foreign_key: {to_table: :comee_core_fulfillment_centers}

      t.timestamps
    end
    add_index :comee_core_products, :code, unique: true
    add_index :comee_core_products, :ancestry
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
comee_core-0.1.63 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.62 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.61 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.60 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.59 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.58 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.57 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.56 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.55 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.54 db/migrate/20230728014322_create_comee_core_products.rb