Fix manage.py script for migrations.
This commit is contained in:
parent
c8b4c54742
commit
2b443e2826
@ -1,10 +1,13 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from flask.ext.script import Manager
|
from flask.ext.script import Manager
|
||||||
from flask.ext.migrate import MigrateCommand
|
from flask.ext.migrate import Migrate, MigrateCommand
|
||||||
|
|
||||||
from accountant import app
|
from accountant import app, db
|
||||||
|
|
||||||
manager = Manager(app)
|
manager = Manager(app)
|
||||||
|
|
||||||
|
migrate = Migrate(app, db)
|
||||||
|
|
||||||
manager.add_command('db', MigrateCommand)
|
manager.add_command('db', MigrateCommand)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user