Skip to content

Commit

Permalink
merge makedb.py into manage.py
Browse files Browse the repository at this point in the history
  • Loading branch information
emillon committed Oct 27, 2014
1 parent 3b02916 commit 0d1a5e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 0 additions & 10 deletions makedb.py

This file was deleted.

9 changes: 8 additions & 1 deletion manage.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
"""
Flask-script stuff
"""
from flask.ext.migrate import MigrateCommand
from flask.ext.migrate import MigrateCommand, stamp
from flask.ext.script import Manager
from app.factory import create_app
from app.models import db

def main():
manager = Manager(create_app)
manager.add_command('db', MigrateCommand)
manager.add_option('-c', '--config', dest='config_file', required=False)

@manager.command
def create():
"Creates database tables from sqlalchemy models"
db.create_all()
stamp()

manager.run()

if __name__ == '__main__':
Expand Down

0 comments on commit 0d1a5e0

Please sign in to comment.