har4s
DTDrizzle Team
•Created by har4s on 6/1/2024 in #help
hey there! is there any chance to get migrations from code instead of cli?
Hello,
I'm currently using Drizzle ORM and I am wondering if there is a way to generate migrations from code instead of using the CLI. Here is a code snippet demonstrating what I'm trying to achieve:
In this example, I am trying to generate the migrations programmatically. Specifically, I am using the generateDrizzleJson and generateMigration functions to create the migration JSON objects and then log them to the console.
Is there any official support or recommended way to handle migrations directly from the code like this? Or is the CLI the only supported method at the moment?
Any guidance or examples would be greatly appreciated.
Thank you!
1 replies