Sha256: 0897b965bc8cf5d7eed0e319082251f45ab101269227e664f636f233518b39bd

Contents?: true

Size: 328 Bytes

Versions: 7

Compression:

Stored size: 328 Bytes

Contents

class CreateCarts < ActiveRecord::Migration[4.2]

  def change
    create_table :carts do |t|
      t.integer :shop_id, limit: 8
      t.string :token
      t.jsonb :data

      t.timestamps null: false
    end
    add_foreign_key :carts, :disco_app_shops, column: :shop_id
    add_index :carts, :token, unique: true
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.17.0 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.18.0 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.18.2 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.18.3 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.18.6 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.18.4 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.18.1 test/dummy/db/migrate/20161105054746_create_carts.rb