Add a Prisma Ignore file to ignore certain tables
See original GitHub issueProblem
In our project we have temporary tables for daily logs before they’re offloaded to file storage at the end of the day. Right now, when we do prisma db pull
, it pulls those tables into the prisma schema as well even though we don’t really care about those tables in code. These tables are created and dropped at the beginning and end of each day.
Suggested solution
We could have a .prismaignore
or something file where we can specify a list of relations/items to be ignored when introspecting (and maybe migrating etc too? I haven’t tried using prisma migrate so I’m not sure). All of our these types of tables have a consistent naming scheme where it’s <tableName>-<todaysDate> format so we can use regex to distinguish those tables.
Alternatives
I think this is a pretty clean solution tbh, I can’t think of any other solutions off the top of my head.
Additional context
N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@janpio No absolutely, I know. I was just thinking out loud (well, over text) that the workarounds might indeed be useful, I did not mean it in a way to imply you were forcing me to use it that way. Apologies if it came across that way.
And thanks, I will do that.
All good, just wanted to make sure you heard what I said and it seems oyu did 👍 Thanks.