Framinus / pizza-restaurant

An API built in Node, Express and PostgreSQL
0 stars 0 forks source link

Remove all instances of pizza_cart from project #12

Closed alexandrawaite closed 6 years ago

alexandrawaite commented 6 years ago

Decided to make this a separate issue. I jumped right into refactoring the cart queries and upon resetting the database, received "relation pizza_cart does not exist" errors from the seed.sql file.

alexandrawaite commented 6 years ago

After removing pizza_cart from the seed.sql file and the database function files still containing pizza_cart, I received a bunch of relation "" does not exist errors from the schema when trying to reset the database. I realized we needed to change the order of the cart and pizza tables now that cart is a foreign key in the pizza table.

I moved the cart table above the pizza table and moved the payment_method and credit_card tables above cart to resolve the relation errors. Database seeds fine now! I'll merge those changes to master to start on the pizza/cart queries.