frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

prisma.users.findMany(\nThe table `public.users` does not exist in the current database." [12:44pm] #269

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: background: tried EC2aws deploy -> issue with .pem key. ssh-i-ubuntu-iterm -> freeze while installing deps, Ctrl-C during freeze breaks key Azure deployment: $272/month for database so now: Heroku "Fully Managed" Db for $5/mo to hopefully be used with azure "App Service"

Browser console provided error which is title of issue. Screen Shot 2023-07-04 at 12 46 37 PM

this is the login screen. The boat is the loading bar for puppeteer. just UI by now. 2 cups provide user with choice: save icon to localStorage | save icon to DB (and localstorage to persist through pagenav) Screen Shot 2023-07-04 at 12 44 19 PM

code from which "line 247" comes. Promise based func-> guide user to login upon successful data submit.

Screen Shot 2023-07-04 at 12 46 10 PM

proposed approach: 1: .connectionPool() ? 2: try to google and set psql up with just connection string. If we're this far it looks like the connection string worked so that's 👍

frankcollins3 commented 1 year ago

chat(GPT) found it quicker than I did which hasn't been happening recently:

heroku run npx prisma migrate dev -a your-app-name [1:40pm]

frankcollins3 commented 1 year ago

verifies connection (was pretty sure of this because I thought app would return errors. it atleast lets you try hitting DB) (if ENV wasn't set up correctly; I think that'd be a breaking change but might be wrong)

2/20 connections: Screen Shot 2023-07-04 at 1 42 47 PM

frankcollins3 commented 1 year ago

dont need to post a separate issue but would exceed $5/mo tier if connections exceeds 20, which it quickly turned to 2. heroku pg:killall --app application_name [7:04pm]

frankcollins3 commented 1 year ago

https://github.com/prisma/prisma-examples/blob/latest/deployment-platforms/heroku/package.json scripts: "build" [7:51pm]

chat provided this code without && prisma migrate and I suggested that it could be missing the migrate statement: "build": "npm run build --prefix client && prisma generate && prisma migrate"

[7:58pm] this below linked article led to the creating of procfile: from terminal commands described therein https://www.prisma.io/docs/guides/deployment/deployment-guides/deploying-to-heroku

Screen Shot 2023-07-04 at 8 11 06 PM

[8:10pm]

frankcollins3 commented 1 year ago

problem was trusting chatAI when stack-Oflow solved in 5 minutes. another problem was psql cli not working. 👍 npx prisma db push [12:20am]