2017-05-27 14:43:27 +00:00
|
|
|
#!/usr/bin/env python3
|
2017-05-21 15:47:16 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2017-05-27 20:19:38 +00:00
|
|
|
import sys
|
2017-05-21 15:47:16 +00:00
|
|
|
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__":
|
2017-05-27 20:19:38 +00:00
|
|
|
# Patch sys.argv to default to 'db'
|
2017-05-27 23:47:47 +00:00
|
|
|
sys.argv.insert(1, 'db')
|
2017-05-27 20:19:38 +00:00
|
|
|
|
2017-05-21 15:47:16 +00:00
|
|
|
manager.run()
|