frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

db changed but is writing to original db [12:23pm] #111

Closed frankcollins3 closed 11 months ago

frankcollins3 commented 11 months ago

attempting to do: fix FK_index issue with a graphQL resolver in public deployment, but done so locally first.

error: db is writing to PSQL tables from: \c waterapp; \c otherwaterapp;

when it has already been changed and server restart. Screen Shot 2023-07-31 at 12 22 17 PM Screen Shot 2023-07-31 at 12 22 01 PM Screen Shot 2023-07-31 at 12 21 07 PM

proposed approach: 0: already separating concerns by changing the database instead of tampering with one that worked before.

1: reset server again. reset postgres.

frankcollins3 commented 11 months ago

also reporting that it didn't make sense for it to go to localhost:3000 since localhost wasn't running on another port // npx kill-port 5000;

// nvm this is wrong info it was running just removed cache and cleared browser tab of :host/3000

frankcollins3 commented 11 months ago

unique constraint registering this as not existing which means it's not in the DB. still weird how 3001 and 3000 crossed. had to restart the server twice apparently. or maybe some cache in the browser that 3000 was still running in node but not in browser caused problems.

Screen Shot 2023-07-31 at 12 28 50 PM

[12:29pm]

frankcollins3 commented 11 months ago

wow unique constraint checker was misfiring which it wasn't doing when only 1 database was there.

proposed approach: check if this is a node / npm cache related to a saved database .env -> .env.local -> also made these two files in sync because they weren't.

Screen Shot 2023-07-31 at 12 32 29 PM Screen Shot 2023-07-31 at 12 33 09 PM

it even allowed a unique username to go into: \c waterapp;

and provided it a correct, and automatic: @default (autoincrement())

[12:35pm]

frankcollins3 commented 11 months ago

besisdes: hard reload/closing terminals

👍 .env -> .env.local (being out of sync seemed to be the problem) // kind of confused because I thought .env and DB_connection exclusively depended on .env but seems to be both.

[12:43pm]