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
establish connection using user profiles #69
Conversation
user_id INTEGER NOT NULL REFERENCES users, | ||
user INTEGER, -- 1 if this contact is a user | ||
created_at TEXT NOT NULL DEFAULT (datetime('now')), | ||
UNIQUE (user_id, local_contact_ref) ON CONFLICT FAIL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does ON CONFLICT FAIL
achieve here? reading up on it, it seems somewhat destructive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it allows to stay within the transaction when the name clashes without rolling back the previous changes - the retry loop that increments the suffix relies on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test how it works though yet
No description provided.