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

establish connection using user profiles #69

Merged
merged 4 commits into from Jul 5, 2021
Merged

Conversation

epoberezkin
Copy link
Member

No description provided.

@epoberezkin epoberezkin changed the title establish connection using user profiles (TODO: delete contact and send message) establish connection using user profiles Jul 5, 2021
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,
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Member Author

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

@epoberezkin epoberezkin merged commit 58889be into v4 Jul 5, 2021
@epoberezkin epoberezkin deleted the ep/chat_profile branch July 5, 2021 18:54
@epoberezkin epoberezkin mentioned this pull request Sep 3, 2021
16 tasks
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

2 participants