WDI-SEA / project-2-issues

0 stars 0 forks source link

issue with one of tables in psql #37

Closed galyverasi closed 2 years ago

galyverasi commented 2 years ago

ERROR: relation "userrestaurants" does not exist

I've tried dropping the table and recreating it

mgkdn9 commented 2 years ago

I'm having the same issue I think:


           List of relations
 Schema |     Name      | Type  | Owner 
--------+---------------+-------+-------
 public | SequelizeMeta | table | user
 public | responses     | table | user
 public | toolRequests  | table | user
 public | users         | table | user
(4 rows)

OoIHaveThat_development=# select * from toolRequests;
ERROR:  relation "toolrequests" does not exist
LINE 1: select * from toolRequests;

are you seeing the data exists with \dt?
DoireannJane commented 2 years ago

Seems like a schema issue but you're in public. Galyver are you in public?

galyverasi commented 2 years ago

Yes in public. All other tables are fine. userRestaurants gives me this error

               List of relations
 Schema |      Name       | Type  |   Owner    
--------+-----------------+-------+------------
 public | SequelizeMeta   | table | galyverasi
 public | restaurants     | table | galyverasi
 public | reviews         | table | galyverasi
 public | userRestaurants | table | galyverasi
 public | users           | table | galyverasi
(5 rows)

leggo_my_veggo_development=# SELECT * FROM userRestaurants;
ERROR:  relation "userrestaurants" does not exist
LINE 1: SELECT * FROM userRestaurants;
DoireannJane commented 2 years ago

It's capitalized SELECT and try putting quotes around toolRequests and userRestaurants!

DoireannJane commented 2 years ago

Let me know if this works for you

mgkdn9 commented 2 years ago

quotes worked!