Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when migrating from ckanext-xloader: column "job_key" of relation "jobs" does not exist #149

Open
pdelboca opened this issue Jul 3, 2024 · 3 comments

Comments

@pdelboca
Copy link
Contributor

pdelboca commented Jul 3, 2024

Describe the bug
Database migration runs successfully but they do not create the required columns. Running datapusher-plus will raise an error:
column "job_key" of relation "jobs" does not exist

To Reproduce
Steps to reproduce the behavior:

  1. Have an instance with ckanext-xloader running
  2. Disable ckanext-xloader
  3. Install and enable datapusher-plus
  4. Run datapusher-plus database migrations (ckan datapusher init-db and ckan db upgrade -p datapusher_plus)
  5. Try to push data to the datastore

Expected behavior
Running database migrations will successfully create the database tables or raise an error if conflicting tables already exist. (Maybe this is a error in CKAN)

Additional context
So I have an instance with ckanext-xloader running and I'm migrating to datapusher-plus. Deactivating ckanext-xloader left the jobs table in the database. This is causing some inconsistent behaviour in CKAN since when I'm executing ckan datapusher init-db I have a Success confirmation message but the table is not created. I only have a leftover of the jobs table that ckanext-xloader created.

As I mention, this is probably an error in CKAN, but I wanted to create an issue here since it may happen to other users trying to migrate to datapusher-plus.

@pdelboca pdelboca changed the title Issue when migrating from ckanext-xloader Issue when migrating from ckanext-xloader: column "job_key" of relation "jobs" does not exist Jul 3, 2024
@pdelboca
Copy link
Contributor Author

pdelboca commented Jul 3, 2024

@tino097 @jqnatividad I'm wondering if this is something you would like to handle in a database migration (like you have for checking aps_jobs_id and logs.id) or if this should be handled by a migration on the project dealing with this.

@tino097
Copy link
Collaborator

tino097 commented Jul 3, 2024

Thanks again @pdelboca. This is good question and we should look into asap.

Additionally this comment is suggesting me that we should drop old Datapusher from CKAN core and move the templates and other code into DP+/Xloader

@jqnatividad
Copy link
Contributor

Thanks for the detailed report @pdelboca . We will handle this in the migration scripts - so folks can have a path from both loader and the legacy datapusher.

Now that the migration to an extension is largely done thanks to @tino097 , I can start catching up the Analysis part of DP+ for which we've been building a lot of features into qsv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants