is there a way to dynamically create or notify the...
# prisma-client
m
is there a way to dynamically create or notify the prisma client to new tables without having to rebuild the entire client? the example specifically that comes into play is if i am creating more or less a CMS that allows the individual to create a data model (think more amongst the lines of strapi / contentful), i would like to generate out a table structure for that and then allow prisma to understand it without having to update the schema file and then run migrations and generate the client once again, i am sure some form of generation needs to happen but to be able to dynamically add in additional tables without the full generator process running again to create the underlying client would be nice.
๐Ÿ‘€ 1
โœ… 1
I am also guessing that there would be a performance cost to bear in this scenario but overall it could help greatly in providing some additional pathways to dynamically creating everything from say an internal metadata table from a database that would populate said information. the other route is to make it atomic and essentially internally commit, regenerate the client and then distribute it via a deployment of some kind but it is a bit overkill. the other option is to essentially have a shared state via NFS or otherwise and re-generate the client which could introduce some instability especially with caching.
n
Hey Mike ๐Ÿ‘‹ At the moment it isnโ€™t possible to add new models without needing to generate PrismaClient, but the approach you mentioned could definitely be useful in certain scenarios. Could you create a Feature Request for it here so that our engineering and product teams can have a look at it?