cart creation backend logic is at place / adding items in progress
This commit is contained in:
10
front-api/db/migrate/20150206034839_create_carts.rb
Normal file
10
front-api/db/migrate/20150206034839_create_carts.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateCarts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :carts do |t|
|
||||
t.integer :user_id
|
||||
t.boolean :ordered, default: false
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
10
front-api/db/migrate/20150206035042_create_item_in_carts.rb
Normal file
10
front-api/db/migrate/20150206035042_create_item_in_carts.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateItemInCarts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :item_in_carts do |t|
|
||||
t.integer :cart_id
|
||||
t.integer :item_id
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddCountToItemInCart < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :item_in_carts, :count, :integer
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddAnonymousUserIdToCart < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :carts, :anonymous_id_string, :string
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user