0

alembic.ini file:

[alembic]  
#path to migration scripts  
script_location = migrations

Script I am running:

alembic -n dev revision --autogenerate -m "alembic_migration_file"

My project directory:

|-migrations  
|--versions  
|----dev  
|----uat

I am running above script, not sure why it's not able to find the script_location from alembic config file.

Robert
  • 7,394
  • 40
  • 45
  • 64
codechef
  • 1
  • 1

1 Answers1

0

In a nutshell, the content of the configuration file is incompatible with the invocation.

From the Alembic 1.11.2 help text:

$ alembic --help
[...]
  -n NAME, --name NAME  Name of section in .ini file to use for Alembic config

thus, -n dev command line argument tells Alembic to read a [dev] section in the config file, but the provided alembic.ini file contains an [alembic] section instead, so Alembic is not able to determine its configuration.

To fix the problem, either rename [alembic] to [dev] in the alembic.ini file, or remove the -n dev argument from the invocation.

otterrisk
  • 349
  • 3
  • 8