Sha256: 36549d8ce523357e6101e4973dc699f86a5b00273c17c12af1ea353da7e89781

Contents?: true

Size: 631 Bytes

Versions: 14

Compression:

Stored size: 631 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.jsonb :metadata
      t.references :product_type,
        null: false,
        index: {name: "ccpt_on_ccp_indx"},
        foreign_key: {to_table: :comee_core_product_types}
      t.references :unit,
        null: false,
        index: {name: "unit_on_ccp_indx"},
        foreign_key: {to_table: :comee_core_units}

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
comee_core-0.1.23 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.22 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.21 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.20 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.19 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.18 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.17 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.16 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.15 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.14 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.13 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.12 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.11 db/migrate/20230728014322_create_comee_core_products.rb
comee_core-0.1.10 db/migrate/20230728014322_create_comee_core_products.rb