Sha256: a0cd4481127d7b428f8b854f8f69b7c14e4bc1ee60a848c557c11dfb6af6d9c8

Contents?: true

Size: 321 Bytes

Versions: 19

Compression:

Stored size: 321 Bytes

Contents

class CreateCarts < ActiveRecord::Migration
  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

19 entries across 19 versions & 1 rubygems

Version Path
disco_app-0.10.5 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.11.0 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.11.1 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.12.0 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.12.1 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.12.5 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.12.6 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.12.7 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.0 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.1 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.2 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.3 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.4 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.5 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.6 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.7 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.8 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.12.7.pre.puma.pre.3 test/dummy/db/migrate/20161105054746_create_carts.rb
disco_app-0.13.6.pre.puma.pre.3 test/dummy/db/migrate/20161105054746_create_carts.rb