I have a Nest.js backend deployed on an EC2 instance, which is connected to a Postgres database on a separate server. The backend has some basic API endpoints, and I’m using the types provided by the Prisma client in my controllers and services for the parameter types.
Here’s an example of how I’m using Prisma types:
@Post() create(@Body() createUserDto: Prisma.usersCreateInput) { return this.usersService.create(createUserDto); }
The database structure is not yet finalized, and new columns are being added to tables almost daily. The Prisma types are updated after running Prisma generate, which is causing a problem because it deletes all the data in the database.
Is there a way to dynamically update the Prisma types as the table structure changes without deleting the existing data in the database?