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

Add UUID db columns #873

Merged
merged 7 commits into from
Jun 21, 2018
Merged

Add UUID db columns #873

merged 7 commits into from
Jun 21, 2018

Conversation

artur-intech
Copy link
Contributor

@artur-intech artur-intech commented Jun 12, 2018

It will be generated on DB level
@@ -16,6 +16,7 @@ def transfer(new_registrar)
new_contact.regenerate_code
new_contact.regenerate_auth_info
new_contact.remove_address unless self.class.address_processing?
new_contact.uuid = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this required? Is there a reason why UUIDs cannot stay the same after a transfer, like primary keys?

Copy link
Contributor Author

@artur-intech artur-intech Jun 13, 2018

Choose a reason for hiding this comment

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

Because transfer operation effectively creates a new copy of a contact, based on the original one. What primary key remains the same?

Copy link
Contributor

@maciej-szlosarczyk maciej-szlosarczyk Jun 13, 2018

Choose a reason for hiding this comment

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

Why then pkey stays the same, instead of also being regenerated?

Copy link
Contributor Author

@artur-intech artur-intech Jun 13, 2018

Choose a reason for hiding this comment

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

Primary key is unique by definition. Where do you see that it remains the same?

Copy link
Contributor

Choose a reason for hiding this comment

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

Folding issues, didn't see the self.dup at the beginning. All good 👍

screen shot 2018-06-13 at 12 29 55

@vohmar vohmar merged commit 81f70c7 into master Jun 21, 2018
@vohmar vohmar deleted the add-uuid-db-columns branch June 27, 2018 07:24
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.

3 participants