forked from conwetlab/ckanext-datarequests
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from qld-gov-au/develop
QOLDEV-327 move database setup to command line
- Loading branch information
Showing
12 changed files
with
196 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# encoding: utf-8 | ||
|
||
import click | ||
|
||
from . import db | ||
|
||
# Click commands for CKAN 2.9 and above | ||
|
||
|
||
@click.group() | ||
def datarequests(): | ||
""" Data Request commands | ||
""" | ||
pass | ||
|
||
|
||
@datarequests.command() | ||
def init_db(): | ||
""" Create tables to store data requests. | ||
""" | ||
db.init_db() | ||
|
||
|
||
@datarequests.command() | ||
def update_db(): | ||
""" Make any database updates that may have been defined | ||
after tables were created. | ||
""" | ||
db.update_db() | ||
|
||
|
||
def get_commands(): | ||
return [datarequests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.