Sha256: 9c682c18cc23541a2b02e77b1ea08a0a91ce45d214bf1a88256ec36c017a76d6

Contents?: true

Size: 934 Bytes

Versions: 6

Compression:

Stored size: 934 Bytes

Contents

class CreateUnidomPickItems < ActiveRecord::Migration

  def change

    create_table :unidom_pick_items, id: :uuid do |t|

      t.references :pick_list,      type: :uuid, null: false
      t.references :inventory_item, type: :uuid, null: false,
        polymorphic: { null: false, default: '', limit: 200 }

      t.decimal :quantity, null: false, default: 0.0, precision: 12, scale: 2

      t.text :description
      t.text :instruction

      t.column   :state, 'char(1)', null: false, default: 'C'
      t.datetime :opened_at,        null: false, default: ::Time.utc(1970)
      t.datetime :closed_at,        null: false, default: ::Time.utc(3000)
      t.boolean  :defunct,          null: false, default: false
      t.jsonb    :notation,         null: false, default: {}

      t.timestamps null: false

    end

    add_index :unidom_pick_items, :pick_list_id
    add_index :unidom_pick_items, :inventory_item_id

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
unidom-inventory-1.0.5 db/migrate/20020922000000_create_unidom_pick_items.rb
unidom-inventory-1.0.4 db/migrate/20020922000000_create_unidom_pick_items.rb
unidom-inventory-1.0.3 db/migrate/20020922000000_create_unidom_pick_items.rb
unidom-inventory-1.0.2 db/migrate/20020922000000_create_unidom_pick_items.rb
unidom-inventory-1.0.1 db/migrate/20020922000000_create_unidom_pick_items.rb
unidom-inventory-1.0 db/migrate/20020922000000_create_unidom_pick_items.rb