Python flask_migrate.MigrateCommand() Examples
The following are 3
code examples of flask_migrate.MigrateCommand().
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
flask_migrate
, or try the search function
.

Example #1
Source Project: timesketch Author: google File: tsctl.py License: Apache License 2.0 | 6 votes |
def main(): # Setup Flask-script command manager and register commands. shell_manager = Manager(create_app) shell_manager.add_command('add_user', AddUser()) shell_manager.add_command('list_users', ListUsers()) shell_manager.add_command('add_group', AddGroup()) shell_manager.add_command('list_groups', ListGroups) shell_manager.add_command('manage_group', GroupManager()) shell_manager.add_command('add_index', AddSearchIndex()) shell_manager.add_command('db', MigrateCommand) shell_manager.add_command('drop_db', DropDataBaseTables()) shell_manager.add_command('list_sketches', ListSketches()) shell_manager.add_command('purge', PurgeTimeline()) shell_manager.add_command('search_template', SearchTemplateManager()) shell_manager.add_command('import', ImportTimeline()) shell_manager.add_command('version', GetVersion()) shell_manager.add_command('runserver', Server(host='127.0.0.1', port=5000)) shell_manager.add_option( '-c', '--config', dest='config', default='/etc/timesketch/timesketch.conf', required=False) shell_manager.run()
Example #2
Source Project: gitlab-tools Author: Salamek File: gitlab_tools.py License: GNU General Public License v3.0 | 5 votes |
def migrations() -> None: app = create_app(parse_options()) manager = Manager(app) manager.add_command('migrations', MigrateCommand) manager.run()
Example #3
Source Project: dribdat Author: hackathons-ftw File: manage.py License: MIT License | 5 votes |
def create_app(script_info=None): """Initialise the app object""" if os.environ.get("DRIBDAT_ENV") == 'prod': app = init_app(ProdConfig) else: app = init_app(DevConfig) app.shell_context_processor(shell_context) app.cli.add_command('db', MigrateCommand) return app