move alembic.ini to python app dir
This commit is contained in:
parent
152d037323
commit
b3429ec69c
@ -3,8 +3,9 @@ recursive-include mediagoblin *.js *.css *.png *.svg *.ico
|
||||
recursive-include mediagoblin *.ini
|
||||
recursive-include mediagoblin *.html *.txt
|
||||
recursive-include docs *.rst *.html
|
||||
include mediagoblin.example.ini mediagoblin/config_spec.ini paste.ini alembic.ini
|
||||
include mediagoblin.example.ini mediagoblin/config_spec.ini paste.ini
|
||||
include mediagoblin/config_spec.ini
|
||||
include mediagoblin/db/migrations/alembic.ini
|
||||
graft extlib
|
||||
graft licenses
|
||||
graft devtools
|
||||
|
@ -365,9 +365,8 @@ def build_alembic_config(global_config, cmd_options, session):
|
||||
configuration. Initialize the database session appropriately
|
||||
as well.
|
||||
"""
|
||||
root_dir = os.path.abspath(os.path.dirname(os.path.dirname(
|
||||
os.path.dirname(__file__))))
|
||||
alembic_cfg_path = os.path.join(root_dir, 'alembic.ini')
|
||||
alembic_dir = os.path.join(os.path.dirname(__file__), 'migrations')
|
||||
alembic_cfg_path = os.path.join(alembic_dir, 'alembic.ini')
|
||||
cfg = Config(alembic_cfg_path,
|
||||
cmd_opts=cmd_options)
|
||||
cfg.attributes["session"] = session
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = %(here)s/mediagoblin/db/migrations
|
||||
script_location = %(here)s
|
||||
|
||||
# template used to generate migration files
|
||||
# file_template = %%(rev)s_%%(slug)s
|
Loading…
x
Reference in New Issue
Block a user