Skip to content

Generate a SQL schema file #1643

Answered by rotemtam
plutino asked this question in Q&A
May 9, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey @plutino

Thanks for reaching out. It's possible to use "schema inspect" on a migration dir. by using SQL formatting you can get the "sum" schema:

atlas schema inspect -u "file://path/to/dir" --dev-url docker://postgres/15 --format "{{ sql . }}"

Notice that if you use "schema apply" you can directly apply this schema to your target db.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@plutino
Comment options

@plutino
Comment options

Answer selected by plutino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants