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

Migration / Cleaning up database tables and columns / PostGres DB / Version 3.12.6 to 4.2.2 #7979

Open
rime1014 opened this issue Apr 24, 2024 · 0 comments

Comments

@rime1014
Copy link

Describe the bug
Cleanup of database tables and columns no longer needed after a database migration from GN 3.12.6 to GN 4.2.2 (Postgres). Obsolete tables and columns are not deleted during migration.

The following tables are still present after the database migration, but not in a bare new GN 4.2.2 instance. These tables should be cleaned up during the migration:

  • services & serviceparameters: Contains data on the virtual CSW, which is not supported with GN 4.2.2, so these tables are no longer required.
  • cswservercapabilitiesinfo
  • guf_citation

Additionally, the guf_userfeedbacks table contains columns and one constraint that is no longer required. They might be deleted during migration.

To Reproduce
Steps to reproduce the behavior:

  1. Start GeoNetwork migration from version 3.12.6 to version 4.2.2
  2. Set up a bare new GN 4.2.2 instance
  3. Compare the mentioned database tables between the migrated database and the database of the new GN 4.2.2 instance

Expected behavior
Migration takes cleaning up database tables and columns into account. The migrated database does not contain obsolete tables and columns.

Desktop (please complete the following information):

  • GeoNetwork Version 4.2.2
  • Server Application Tomcat 8

Additional context
Partial solution proposal:

-- Postgres SQL statement to clean up the guf_userfeedbacks table
ALTER TABLE IF EXISTS geonetwork.guf_userfeedbacks DROP CONSTRAINT IF EXISTS fk_e9nt5jgp7gi12nvavaacs7bbr;
ALTER TABLE IF EXISTS geonetwork.guf_userfeedbacks DROP COLUMN IF EXISTS comment;
ALTER TABLE IF EXISTS geonetwork.guf_userfeedbacks DROP COLUMN IF EXISTS date;
ALTER TABLE IF EXISTS geonetwork.guf_userfeedbacks DROP COLUMN IF EXISTS citation_id;
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

1 participant