Create virtual metaData from create table. #1408
Answered
by
zzzeek
jtknights08
asked this question in
Usage Questions
-
Is there currently a way to give alembic a create table statement or parsing mechanism as the metaData to update a target db? This is a weekly backup we want to automate the schema updates for and currently use Alembic for the source data these backups come from but we can't guarantee the schema is accurate to our files. |
Beta Was this translation helpful? Give feedback.
Answered by
zzzeek
Jan 25, 2024
Replies: 1 comment 2 replies
-
this is the basic use case for autogenerate: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you would have to run those CREATE statements into a database somewhere, then reflect them back.
if you dont want a database involved then you'd have to do some kind of parsing. The MySQL dialect in SQLAlchemy does have a parser for CREATE TABLE internally so perhaps you can re-purpose it.