Closed 3point14guy closed 7 years ago
What database are you connected to?
Good question? How do I tell? It must not be the right one because I see tables for recipes, ingredients, books, etc.
When you're in the console, it's the name to the left. ie:
When we go into our sql-crud DB it changes from <yourname>
to sql-crud
~/wdi/projects/groovy-movie2/back-end/rails-api-groovy-movie (master) $ psql sql-crud psql (9.6.3) Type "help" for help.
sql-crud=#
Ok, so maybe I wasn't going to quite the right place, but even under just psql, I don't see my new table.
Unless I'm misunderstanding and you've already checked there, I would try checking your main DB, not your sql-crud
DB. We were using sql-crud
for our lessons.
Yes, I just checked using just psql. I get a different list of tables but not the new one I am creating for this project.
nicholaspiaskoski=# \d
List of relations
Schema | Name | Type | Owner
--------+--------------------+----------+-------------------
public | ingredients | table | nicholaspiaskoski
public | ingredients_id_seq | sequence | nicholaspiaskoski
public | patients | table | nicholaspiaskoski
public | patients_id_seq | sequence | nicholaspiaskoski
(4 rows)
got it: rails-api-groovy-movie_development=# it's there
I created my table with generate scaffold and did db:migrate, but when I go into psql and run \d, my table doesn't show up. My schema file does show that it was created.
I went over the lesson plan for rails-api one to many to find pointers, I attempted to google, but I can't seem to come up with a search string that gets me the info I am after and review of the closed issues doesn't show anything comparable to my current issue.
I am missing a step, please help me get back on track.