Add flask-Migrate + alembic for automated database migrations.

Update some dependencies to their latest version.
Make executable scripts executable (chmod +x).
This commit is contained in:
nyaadev
2017-05-21 17:47:16 +02:00
parent 740be1a40a
commit 152e547ac5
12 changed files with 194 additions and 16 deletions

13
db_migrate.py Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from nyaa import app, db
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command("db", MigrateCommand)
if __name__ == "__main__":
manager.run()