New DB script to replace old one

- forgot about production only properties.
This commit is contained in:
Martyn Inglis
2016-01-11 13:53:55 +00:00
parent ee034723b7
commit 95b6da9b4e
2 changed files with 16 additions and 1 deletions

15
db.py Normal file
View File

@@ -0,0 +1,15 @@
from flask.ext.script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
from app import create_app, db
from credstash import getAllSecrets
secrets = getAllSecrets(region="eu-west-1")
application = create_app('live', secrets)
manager = Manager(application)
migrate = Migrate(application, db)
manager.add_command('db', MigrateCommand)
if __name__ == '__main__':
manager.run()