Fran Dios
09/22/2021, 6:18 PM@relationTable in P1 and I have renamed all of them in DB (PG9) to follow P2 conventions for implicit n-m relations. However, it now throws with these tables something like The column _AddressBook.B does not exist in the current database. at run time. And same happens when trying db push command: Added the required column B to the _AddressBook table without a default value.
Any ideas? The table looks like this:Ryan
09/23/2021, 5:31 AMdb push is the correct command in this case. You would need to run prisma db pull to get the changes.Fran Dios
09/23/2021, 8:38 AMdb pull so my model AddressBook disappeared since now it is considered to be an implicit relationship. However, these errors keep happening. If I try db pull again it doesn’t change anything else, but db push fails with that issue I mentioned.Ryan
09/23/2021, 10:56 AMdb push is for prototyping. What you would ideally work with is Migrate.Fran Dios
09/23/2021, 3:40 PMThe column _AddressBook.B does not exist in the current database <-- but it actually does exist).
And it seems to be a deadlock: db pull does not make any change to my schema anymore but the client doesn’t work. And when trying db push to make sure the DB and Schema are in sync, it tells me that I need to wipe all DB data because a new column “A” was added 🤷
I don’t think Migrate would make any difference here, right?Ryan
09/27/2021, 6:29 AMdb push is just for prototyping in development and is not mentioned in our Upgrade Guide as a process.Fran Dios
10/03/2021, 11:46 AMalter table blackship$dev."AddressBook" rename column "address" to A;
The problem here is that I wass missing double quotes on the column name so Postgres was renaming it to a instead of A 🤦
This makes it happy again:
alter table blackship$dev."AddressBook" rename column "address" to "A";Fran Dios
10/03/2021, 11:46 AM