mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-23 22:27:17 -04:00
Fixed issue with missing migrations directory in release asset.
This commit is contained in:
parent
bccded275c
commit
6f03758bec
2 changed files with 5 additions and 2 deletions
1
.github/files_to_copy
vendored
1
.github/files_to_copy
vendored
|
@ -4,3 +4,4 @@ libs
|
|||
bazarr.py
|
||||
requirements.txt
|
||||
postgres-requirements.txt
|
||||
migrations
|
||||
|
|
|
@ -27,6 +27,8 @@ postgresql = (os.getenv("POSTGRES_ENABLED", settings.postgresql.enabled).lower()
|
|||
|
||||
region = make_region().configure('dogpile.cache.memory')
|
||||
|
||||
migrations_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'migrations')
|
||||
|
||||
if postgresql:
|
||||
# insert is different between database types
|
||||
from sqlalchemy.dialects.postgresql import insert # noqa E402
|
||||
|
@ -313,7 +315,7 @@ def create_db_revision(app):
|
|||
db = SQLAlchemy(app, metadata=metadata)
|
||||
with app.app_context():
|
||||
flask_migrate.Migrate(app, db, render_as_batch=True)
|
||||
flask_migrate.migrate()
|
||||
flask_migrate.migrate(directory=migrations_directory)
|
||||
db.engine.dispose()
|
||||
|
||||
|
||||
|
@ -329,7 +331,7 @@ def migrate_db(app):
|
|||
|
||||
with app.app_context():
|
||||
flask_migrate.Migrate(app, db, render_as_batch=True)
|
||||
flask_migrate.upgrade()
|
||||
flask_migrate.upgrade(directory=migrations_directory)
|
||||
db.engine.dispose()
|
||||
|
||||
# add the system table single row if it's not existing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue