Get `CREATE TABLE ...` SQL from a schema
Is there a way to get the SQL to create a table based on the table's schema ?
I am doing some tests with Drizzle-ORM, and I don't want to setup Drizzle-Kit and all the migrations stuff just for that.
Given a table variable defined with
const table = sqliteTable('table_name', schema);
, is there a way to get the SQL to create the table in the db ? Something like db.run(table.getCreateQuery())
.
Thanks !2 Replies