diff --git a/content/posts/2023-02.md b/content/posts/2023-02.md index f1f9e3e73..9dd2d3450 100644 --- a/content/posts/2023-02.md +++ b/content/posts/2023-02.md @@ -148,4 +148,58 @@ value.replace("Jan","01").replace("Feb","02").replace("Mar","03").replace("Apr", - I checked cgiar.org, ifpri.org, icarda.org, iwmi.cgiar.org, irri.org, etc and corrected a handful - Start a harvest on AReS +## 2023-02-15 + +- Work on rebasing my local DSpace 7 dev branches on top of the latest 7.5-SNAPSHOT + - It seems the issues I had with the `dspace submission-forms-migrate` tool in [August, 2022]({{< relref "2022-08.md" >}}) were fixed +- I imported a fresh PostgreSQL snapshot from CGSpace and then removed the Atmire migrations and ran the new migrations as I originally noted in [March, 2022]({{< relref "2022-03.md" >}}), and is pointed out in the [DSpace 7 upgrade notes](https://wiki.lyrasis.org/display/DSDOC7x/Upgrading+DSpace) + - Now I get a new error: + +```console +localhost/dspace7= ☘ DELETE FROM schema_version WHERE version IN ('5.0.2017.09.25', '6.0.2017.01.30', '6.0.2017.09.25'); +localhost/dspace7= ☘ DELETE FROM schema_version WHERE description LIKE '%Atmire%' OR description LIKE '%CUA%' OR description LIKE '%cua%'; +localhost/dspace7= \q +$ ./bin/dspace database migrate ignored +... + +CREATE INDEX resourcepolicy_action_idx ON resourcepolicy(action_id) + + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:275) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:222) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:126) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:69) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.lambda$execute$0(SqlMigrationExecutor.java:58) + at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:27) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:57) + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:377) + ... 24 more +Caused by: org.postgresql.util.PSQLException: ERROR: relation "resourcepolicy_action_idx" already exists + at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) + at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366) + at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356) + at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496) + at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413) + at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333) + at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319) + at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295) + at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290) + at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193) + at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193) + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:201) + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:95) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:210) + ... 30 more +``` + +- I dropped that index and then the migration succeeded: + +```console +localhost/dspace7= ☘ DROP INDEX resourcepolicy_action_idx; +localhost/dspace7= ☘ \q +$ ./bin/dspace database migrate ignored +Done. +``` + +- I think that particular error is because I applied the [indexes in this unmerged DSpace 6 patch](https://github.com/DSpace/DSpace/pull/1792), so I don't need to report this as an error in DSpace 7 + diff --git a/docs/2023-02/index.html b/docs/2023-02/index.html index 84e8b567e..a2f3dcac2 100644 --- a/docs/2023-02/index.html +++ b/docs/2023-02/index.html @@ -18,7 +18,7 @@ I want to try to expand my use of their data to journals, publishers, volumes, i - + @@ -42,9 +42,9 @@ I want to try to expand my use of their data to journals, publishers, volumes, i "@type": "BlogPosting", "headline": "February, 2023", "url": "https://alanorth.github.io/cgspace-notes/2023-02/", - "wordCount": "1019", + "wordCount": "1245", "datePublished": "2023-02-01T10:57:36+03:00", - "dateModified": "2023-02-13T10:33:16+03:00", + "dateModified": "2023-02-14T23:13:35+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -284,6 +284,62 @@ I want to try to expand my use of their data to journals, publishers, volumes, i
dspace submission-forms-migrate
tool in August, 2022 were fixedlocalhost/dspace7= ☘ DELETE FROM schema_version WHERE version IN ('5.0.2017.09.25', '6.0.2017.01.30', '6.0.2017.09.25');
+localhost/dspace7= ☘ DELETE FROM schema_version WHERE description LIKE '%Atmire%' OR description LIKE '%CUA%' OR description LIKE '%cua%';
+localhost/dspace7= \q
+$ ./bin/dspace database migrate ignored
+...
+
+CREATE INDEX resourcepolicy_action_idx ON resourcepolicy(action_id)
+
+ at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:275)
+ at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:222)
+ at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:126)
+ at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:69)
+ at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.lambda$execute$0(SqlMigrationExecutor.java:58)
+ at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:27)
+ at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:57)
+ at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:377)
+ ... 24 more
+Caused by: org.postgresql.util.PSQLException: ERROR: relation "resourcepolicy_action_idx" already exists
+ at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
+ at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
+ at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
+ at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
+ at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
+ at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
+ at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
+ at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
+ at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
+ at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193)
+ at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193)
+ at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:201)
+ at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:95)
+ at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:210)
+ ... 30 more
+
localhost/dspace7= ☘ DROP INDEX resourcepolicy_action_idx;
+localhost/dspace7= ☘ \q
+$ ./bin/dspace database migrate ignored
+Done.
+