My library database has a few ignored tables running the database info 
command. Running the 'dspace database migrate ignored' command gives an 
error too. I think the resource_id was moved back in version 5 or 6 and 
that is just throwing everything off.

Going from dspace 6.3 to 7
OS: Windows 2012
Java: openjdk 11 2018-09-25
Maven: 3.6.3
Ant: 1.10.9
Postgres: 13.4
Solr: 8.9
Tomcat: 9.0.52

-------------------------------------------------------------------------------
-- grant read/write/delete/add/remove permission on all Bitstreams of 
Bundle --
-- ORIGINAL to reviewers                                                    
 --
-------------------------------------------------------------------------------
INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '0' AS resource_type_id,
    '4' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    b2b.bitstream_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN bundle2bitstream AS b2b
  ON b2b.bundle_id = i2b.bundle_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 0 AND 
action_id = 4 AND resourcepolicy.eperson_id = owner AND 
resourcepolicy.resource_id = b2b.bitstream_id
    );
]; nested exception is org.postgresql.util.PSQLException: ERROR: operator 
does not exist: integer = uuid
  Hint: No operator matches the given name and argument types. You might 
need to add explicit type casts.
  Position: 767
        at 
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
        at 
org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1443)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:388)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:418)
        at 
org.dspace.storage.rdbms.DatabaseUtils.executeSql(DatabaseUtils.java:1092)
        ... 34 more
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not 
exist: integer = uuid
  Hint: No operator matches the given name and argument types. You might 
need to add explicit type casts.
  Position: 767
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2505)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2241)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
        at 
org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:309)
        at 
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:295)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:272)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:267)
        at 
org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
        at 
org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
        at 
org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:409)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376)

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/d37ae589-be32-40ae-ab1f-000e80e515dfn%40googlegroups.com.
INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '1' AS resource_type_id,
    '4' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    i2b.bundle_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 1 AND action_id = 
4 AND resourcepolicy.eperson_id = owner AND resourcepolicy.resource_id = 
i2b.bundle_id
    );


-------------------------------------------------------------------------------
-- grant read/write/delete/add/remove permission on all Bitstreams of Bundle --
-- ORIGINAL to reviewers                                                     --
-------------------------------------------------------------------------------
INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '0' AS resource_type_id,
    '0' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    b2b.bitstream_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN bundle2bitstream AS b2b
  ON b2b.bundle_id = i2b.bundle_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 0 AND action_id = 
0 AND resourcepolicy.eperson_id = owner AND resourcepolicy.resource_id = 
b2b.bitstream_id
    );

INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '0' AS resource_type_id,
    '1' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    b2b.bitstream_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN bundle2bitstream AS b2b
  ON b2b.bundle_id = i2b.bundle_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 0 AND action_id = 
1 AND resourcepolicy.eperson_id = owner AND resourcepolicy.resource_id = 
b2b.bitstream_id
    );

INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '0' AS resource_type_id,
    '2' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    b2b.bitstream_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN bundle2bitstream AS b2b
  ON b2b.bundle_id = i2b.bundle_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 0 AND action_id = 
2 AND resourcepolicy.eperson_id = owner AND resourcepolicy.resource_id = 
b2b.bitstream_id
    );

INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '0' AS resource_type_id,
    '3' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    b2b.bitstream_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN bundle2bitstream AS b2b
  ON b2b.bundle_id = i2b.bundle_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 0 AND action_id = 
3 AND resourcepolicy.eperson_id = owner AND resourcepolicy.resource_id = 
b2b.bitstream_id
    );

INSERT INTO resourcepolicy
  (policy_id, resource_type_id, action_id, rptype, eperson_id, resource_id)
  SELECT
    nextval('resourcepolicy_seq') AS policy_id,
    '0' AS resource_type_id,
    '4' AS action_id,
    'TYPE_WORKFLOW' AS rptype,
    wfi.owner AS eperson_id,
    b2b.bitstream_id AS dspace_object
  FROM workflowitem AS wfi
  JOIN item2bundle AS i2b
  ON i2b.item_id = wfi.item_id
  JOIN bundle2bitstream AS b2b
  ON b2b.bundle_id = i2b.bundle_id
  JOIN metadatavalue AS mv
  ON mv.resource_id = i2b.bundle_id
  JOIN metadatafieldregistry as mfr
  ON mv.metadata_field_id = mfr.metadata_field_id
  JOIN metadataschemaregistry as msr
  ON mfr.metadata_schema_id = msr.metadata_schema_id
  WHERE
    msr.namespace = 'http://dublincore.org/documents/dcmi-terms/'
    AND mfr.element = 'title'
    AND mfr.qualifier IS NULL
    AND mv.text_value = 'ORIGINAL'
    AND wfi.owner IS NOT NULL
    AND (wfi.state = 2 OR wfi.state = 4 OR wfi.state = 6)
    AND NOT EXISTS(
        SELECT 1 FROM resourcepolicy WHERE resource_type_id = 0 AND action_id = 
4 AND resourcepolicy.eperson_id = owner AND resourcepolicy.resource_id = 
b2b.bitstream_id
    );
]; nested exception is org.postgresql.util.PSQLException: ERROR: operator does 
not exist: integer = uuid
  Hint: No operator matches the given name and argument types. You might need 
to add explicit type casts.
  Position: 767
        at 
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
        at 
org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1443)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:388)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:418)
        at 
org.dspace.storage.rdbms.DatabaseUtils.executeSql(DatabaseUtils.java:1092)
        ... 34 more
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: 
integer = uuid
  Hint: No operator matches the given name and argument types. You might need 
to add explicit type casts.
  Position: 767
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2505)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2241)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:309)
        at 
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:295)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:272)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:267)
        at 
org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
        at 
org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
        at 
org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:409)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376)

Reply via email to