Add the possibility to exclude a table absent
We would like to exclude _prisma_migrations because, in a local environment, the table is not always present, causing the generated files to change for no valid reason. However, we encountered this error:
"Collection '_prisma_migrations' not found. List of available collections."
Would it be possible to allow optionally absent tables in the exclude field like this?
.addDataSource(createSqlDataSource("database.url"), {
exclude: ["_prisma_migrations"],
})
Hello, Could you detect your local environment by getting the env.NODE_ENV and adding a condition in the exclude property?
For example:
.addDataSource(createSqlDataSource("database.url"), {
exclude: env.NODE_ENV === 'dev' ? ["_prisma_migrations"] : [],
})
The issue is that in development, the table is not always present, so this approach wouldn’t work. So, it introduces unnecessary changes to the generated files.