Search
Setup for Free
DT
Drizzle Team
•
2y ago
tonyx
How do you get create table statement given a specific pgTable programmatically?
Seems that using drizzle
-kit and migration file generation is required
.
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,800
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
T
tonyx
OP
•
1/31/24, 10:05 AM
Seems that this was an issue before
,
https://github.com/drizzle-team/drizzle-orm/discussions/331
but no solution yet
GitHub
Make simple migration statements available on table objects · drizz...
I have a use case where it would be really nice if a table object had a method similar to query
.toSQL
(
) that returned
(or executed
) the SQL query required to create that table and any indices
. From
.
.
.
Similar Threads
Programmatically get columns from table
DT
Drizzle Team / help
2y ago
Get `CREATE TABLE ...` SQL from a schema
DT
Drizzle Team / help
13mo ago
How do you create a scalar subquery in drizzle?
DT
Drizzle Team / help
2y ago
Programmatically pull table schema (Postgres)
DT
Drizzle Team / help
2d ago