-x --x-arg for commands other than upgrade/downgrade/migrate #1313
-
When using the --multidb or where you have many alembic_version tables across multiple dbs managed by one alembic environment, it would be nice to be able to run stamp/check etc on selected databases. I enable this using the -x --x-args and then in env.py filtering the engines based on the input for the commands that do accept -x --x-arg Does it make sense for stamp/current etc to also accept -x --x-arg or am I missing something? Presently, stamp/current runs on all dbs which was surprising when I ran stamp and set all the databases to head |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
all commands accept the -x argument, it's part of the global options on the argparse object. there's also the issue of which commands make use of It sounds like you have something that's not actually working as expected, so this should be a discussion first. |
Beta Was this translation helpful? Give feedback.
-x
is an argument of the alembic base command, so it will be shown only if you doalembic --help
.passing
-x
like that will not work also when using upgrade or downgrade: runningalembic upgrade -x foo head
will also error withalembic: error: unrecognized arguments: -x head
Like in the other cases you will have to place -x before specifying the command to pass alembic