Skip to content

Commit

Permalink
feat: switch to alembic migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Nov 2, 2023
1 parent 9fb44f7 commit 4d30096
Show file tree
Hide file tree
Showing 14 changed files with 755 additions and 835 deletions.
5 changes: 1 addition & 4 deletions README.rst
Expand Up @@ -94,7 +94,7 @@ Configuration

Run the following command to create the necessary tables in the database (ensuring the pyenv is activated):

(pyenv) $ ckan --config=/etc/ckan/default/ckan.ini harvester initdb
(pyenv) $ ckan --config=/etc/ckan/default/ckan.ini db upgrade -p harvest

Finally, restart CKAN to have the changes take effect::

Expand Down Expand Up @@ -229,9 +229,6 @@ Command line interface

The following operations can be run from the command line as described underneath::

harvester initdb
- Creates the necessary tables in the database

harvester source {name} {url} {type} [{title}] [{active}] [{owner_org}] [{frequency}] [{config}]
- create new harvest source

Expand Down
9 changes: 0 additions & 9 deletions ckanext/harvest/cli.py
Expand Up @@ -20,14 +20,6 @@ def harvester():
pass


@harvester.command()
def initdb():
"""Creates the necessary tables in the database.
"""
utils.initdb()
click.secho(u"DB tables created", fg=u"green")


@harvester.group()
def source():
"""Manage harvest sources
Expand Down Expand Up @@ -337,7 +329,6 @@ def import_stage(
import. e.g. 15af will run segments 1,5,a,f
"""
ctx.invoke(initdb)
flask_app = ctx.meta["flask_app"]
with flask_app.test_request_context():
try:
Expand Down
8 changes: 0 additions & 8 deletions ckanext/harvest/commands/__init__.py

This file was deleted.

0 comments on commit 4d30096

Please sign in to comment.