Sha256: 39fdcef092ff59a202b79549b75c5f33f4d086420c08007a772e1475b4e81e9f

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

class CreateEffectiveProducts < ActiveRecord::Migration[6.1]
  def change
    create_table :rings do |t|
      t.integer :owner_id
      t.string :owner_type

      t.integer :ring_wizard_id
      t.string :ring_wizard_type

      t.integer :size
      t.string :metal

      t.datetime :issued_at

      # Acts as purchasable
      t.integer :purchased_order_id
      t.integer :price
      t.boolean :tax_exempt, default: false
      t.string :qb_item_name

      t.timestamps
    end

    create_table :ring_wizards do |t|
      t.string :token

      t.integer :owner_id
      t.string :owner_type

      t.integer :user_id
      t.string :user_type

      # Acts as Statused
      t.string :status
      t.text :status_steps

      # Acts as Wizard
      t.text :wizard_steps

      # Dates
      t.datetime :submitted_at

      t.datetime :updated_at
      t.datetime :created_at
    end

    add_index :ring_wizards, [:owner_id, :owner_type]
    add_index :ring_wizards, :status
    add_index :ring_wizards, :token

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_products-0.0.5 db/migrate/01_create_effective_products.rb.erb
effective_products-0.0.4 db/migrate/01_create_effective_products.rb.erb
effective_products-0.0.3 db/migrate/01_create_effective_products.rb.erb