Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migration constraints #18

Merged
merged 17 commits into from
Nov 10, 2023
Merged

Fix migration constraints #18

merged 17 commits into from
Nov 10, 2023

Conversation

guillermoap
Copy link
Collaborator

Problem was that when the records where using IDs as the primary_key, when generating the outbox record it would fail because the migration specified that field to be UUID.

  • Added a flag to specify if we want that field to be UUID in the migration, default to ID now.
  • Refactored specs to use shared_examples so it's cleaner to test more scenarios.
    • Had to play a little bit with the specs setup so we could have a table with UUID and ID.
  • Fixed issue with the config mapping where we were setting the namespace incorrectly.
    • Now we can set it with lowercase and underscore. 'UserAccess' => 'user_access'

Not sure if this should be a minor version bump to 0.2.0. Open to suggestions.

class_option :uuid,
type: :boolean,
default: false,
desc: 'Use UUID to identify aggregate records in events. Defaults to ID'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to suggestion on this wording and naming

@guillermoap guillermoap merged commit 92db1ce into main Nov 10, 2023
4 checks passed
@guillermoap guillermoap deleted the fix-migration-constraints branch November 10, 2023 18:23
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.

None yet

3 participants