Stephen Jensen
02/25/2022, 2:05 AM@@map(users) from the model User which will change the database table from users to User. When I run the migration it is saying that it will drop the user's database which I don't want to do 🙂Stephen Jensen
02/25/2022, 3:11 PMprisma migrate dev --create-only
To rename a table you need to add to the migration file:
ALTER TABLE "users" RENAME TO "User";
ALTER TABLE "User" RENAME CONSTRAINT "users_pkey" TO "User_pkey";
for each table name you want to change. With that being said, next-auth sure doesn't make it easy to update their prisma connector to the latest version. There are also a number of fields in the users, accounts and sessions tables that you'll have to change the name of along with the table names themselves. I'll post a reply if I can figure out the specific prisma migration needed to make that work.