Commit 4e4b2e94 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

cli: replace complete-db with an override of init-db


This is made possible by droping the `with_plugins` helper
in rework which makes sub-command override impossible.
parent 9270d1bcf96d
......@@ -5,6 +5,7 @@ import webbrowser
import click
from sqlalchemy import create_engine
from rework import schema as baseschema
from rework_ui.app import startapp
from rework_ui import schema, taskstable
......@@ -24,12 +25,13 @@ def view(db_uri):
input()
@click.command(name='complete-db')
@click.command(name='init-db')
@click.argument('dburi')
def complete_db(dburi):
"""create the db table necessary for handling big tasks table views in the client"""
def init_db(dburi):
"initialize the database schema for rework in its own namespace"
engine = create_engine(dburi)
schema.reset(engine)
baseschema.reset(engine)
baseschema.init(engine)
schema.init(engine)
......
......@@ -21,7 +21,7 @@ setup(name='rework_ui',
]},
entry_points={'rework.subcommands': [
'view=rework_ui.cli:view',
'complete-db=rework_ui.cli:complete_db',
'init-db=rework_ui.cli:init_db',
'generate-tasks-table=rework_ui.cli:generate_tasks_table'
]},
classifiers=[
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment