You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
341 B

  1. import click
  2. from flask.cli import AppGroup
  3. from acks.models import db
  4. default_cli = AppGroup('acks')
  5. @default_cli.command('initdb')
  6. def initialize_database():
  7. from acks import models
  8. from acks.npc import models
  9. db.create_all()
  10. @default_cli.command('dropdb')
  11. def destroy_database():
  12. db.drop_all()
  13. db.session.commit()