Open saschaszott opened 1 year ago
The in-depth analysis in issue #371 has shown that the table subscription
does not have column community_id
in a clean/fresh installation of DS CRIS 7. Therefore, it is crucial that changes in this PR do not affect clean/fresh installations of DS CRIS 7. In its current form, this PR does not consider this fact. It needs to be extended.
To fix the problem mentioned in the comment below it is crucial that the Flyway script V1.8.2.2__DSpaceCRIS-subscription_database_schema.sql
which was shipped with DS CRIS 5 (https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8.2.2__DSpaceCRIS-subscription_database_schema.sql) is added in org/dspace/storage/rdbms/sqlmigration/postgres
.
CRIS installations which have already migrated to DS CRIS 7 need to apply the changes manually.
This PR handles community subscriptions managed in the
subscription
table: it adds the community UUID to columndspace_object_id
. This corresponds to the way new community subscriptions in DS CRIS are managed.Afterward the column
community_id
in thesubscription
table is removed. This column was added with DSpace CRIS based on DSpace 1.8.2.2 (https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8.2.2__DSpaceCRIS-subscription_database_schema.sql).