Sha256: 7f36a20831f5693c37437c0963388e0203957e39e659c57131a64b6322feb79c

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 Bytes

Contents

class CreateShoppingCartOrders < ActiveRecord::Migration[5.0]
  def change
    enable_extension 'uuid-ossp'
    create_table :shopping_cart_orders do |t|
      t.float :total
      t.string :state
      t.uuid :number, default: "uuid_generate_v4()"
      t.belongs_to :delivery, index: true
      t.belongs_to :credit_card, index: true
      t.belongs_to :user, index: true
      t.timestamp :completed_at
      t.timestamps
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 db/migrate/20160814135925_create_shopping_cart_orders.rb
shopping-cart-0.1.1 db/migrate/20160814135925_create_shopping_cart_orders.rb
shopping-cart-0.1.0 db/migrate/20160814135925_create_shopping_cart_orders.rb