chibenwa commented on code in PR #2444: URL: https://github.com/apache/james-project/pull/2444#discussion_r1794212853
########## upgrade-instructions.md: ########## @@ -34,6 +34,36 @@ Change list: - [Migrate RabbitMQ classic queues to version 2](#migrate-rabbitmq-classic-queues-to-version-2) - [JAMES-3946 White list removals](#james-3946-white-list-removals) - [JAMES-4052 Details in quota index](#james-4052-details-in-quota-index) + - [JAMES-1409 Change JPARecipientRewriteTable to store separate record per target address](#james-1409-change-jparecipientrewritetable-to-store-separate-record-per-target-address) + +### JAMES-1409 Change JPARecipientRewriteTable to store separate record per target address + +Date: 09/10/2024 + +JIRA: https://issues.apache.org/jira/browse/JAMES-1409 + +The JPARecipientRewriteTable was modified to store multiple mappings of a single source as separate database rows, +each with a single target address, instead of a single row with a long semicolon-delimited multi-value target address. +This solves both the limitation on the number of mappings (imposed by the column maximum length), and the broken query +by target address. + +For JPA users, the database schema must be changed as following: + +- Change Primary key from (DOMAIN_NAME, USER_NAME) to (DOMAIN_NAME, TARGET_ADDRESS, USER_NAME) (unfortunately, + JPA auto-generates it in alphabetical order). +- Add index USER_NAME_DOMAIN_NAME_TARGET_ADDRESS_INDEX (USER_NAME, DOMAIN_NAME, TARGET_ADDRESS). +- Add index TARGET_ADDRESS_INDEX (TARGET_ADDRESS). +- The columns themselves have not changed. Review Comment: Are the commands database specific or can we provide examples? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
