class CreateShoppingCartOrders < ActiveRecord::Migration
  def change
    create_table :shopping_cart_orders do |t|
      t.string :pay_type
      t.string :shipping_type
      t.string :shipping_info
      t.string :status, null: false, default: 'active'
      t.string :name
      t.string :last_name
      t.string :email
      t.string :phone
      t.string :comment
      t.decimal :amount
      t.decimal :amount_user
      t.string :order_locale
      t.string :order_currency
      t.string :current_step, null: false, default: 'initial'

      t.references :credit_card, index: true
      t.references :orderable, polymorphic: true, index: true

      t.timestamps null: false
    end
  end
end
