Manually create migration file
Is it possible to manually create a migration file like the way prisma has it? basically just creating a sql file that is part of the migration but it does not get executed. I'm asking this because I want to create a migration file for a raw materialized view since views arent supported
8 Replies
I'd suggest to create a regular migration with drizzle, maybe change something minor that you know you can change back, and then edit the migration file manually to add what you need before you run it.
That way Drizzle marks the migration as completed
thanks. I feel like that might still be a good feature to add where you generate an empty script file but its still in history
You can use
--custom
so it would be
drizzle-kit generate:pg --custom
in this case you will have an empty sql file createdTIL
we don't have a lot of words in docs about it
thats great! pretty much what I needed. thank you!