Skip to content

MX-227: Use ANSI SQL in the Liquibase Scripts#103

Merged
IOhacker merged 1 commit intoopenMF:developfrom
IOhacker:develop
Apr 8, 2026
Merged

MX-227: Use ANSI SQL in the Liquibase Scripts#103
IOhacker merged 1 commit intoopenMF:developfrom
IOhacker:develop

Conversation

@IOhacker
Copy link
Copy Markdown
Contributor

@IOhacker IOhacker commented Apr 8, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enhanced duplicate detection for user role assignments and self-service user account creation to improve data integrity and system reliability.

@IOhacker IOhacker merged commit 4131f64 into openMF:develop Apr 8, 2026
1 check passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Expected array, received object at "reviews.path_filters"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5ec3d1aa-f7ba-4e19-bb51-db6afd39b1c6

📥 Commits

Reviewing files that changed from the base of the PR and between 127a60e and de31c08.

📒 Files selected for processing (1)
  • src/main/resources/db/changelog/tenant/module/selfservice/parts/001-create-selfserviceuser-initial-schema.xml

📝 Walkthrough

Walkthrough

Database migration file updated to replace PostgreSQL-specific ON CONFLICT DO NOTHING syntax with portable explicit duplicate detection using NOT EXISTS predicates in three insert statements. Table aliases added for clarity. Conflict-handling approach changed across multiple data insertion operations within the self-service user schema initialization.

Changes

Cohort / File(s) Summary
Database Migration - Conflict Handling Refactor
src/main/resources/db/changelog/tenant/module/selfservice/parts/001-create-selfserviceuser-initial-schema.xml
Replaced ON CONFLICT DO NOTHING with explicit AND NOT EXISTS duplicate detection in ss-0001-10 (user role mappings) and ss-0001-12 (self-service users). Added table aliases for source/destination qualification. Removed trailing ON CONFLICT clause from ss-0001-13. Changes improve cross-database compatibility while maintaining deduplication logic.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐰 A migration most cunning and fine,
We banish conflicts, make logic align,
NOT EXISTS now guards each precious row,
No PostgreSQL tricks—just standards we know!
Portable schemas for all hops and springs, 🌱✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Successfully merging this pull request may close these issues.

1 participant