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 account name migration #239

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
ALTER TABLE users ADD COLUMN account_name VARCHAR(63) NOT NULL UNIQUE;
ALTER TABLE users ADD COLUMN account_name VARCHAR(63);

UPDATE users SET account_name = SUBSTRING(mail FROM 1 FOR POSITION('@' IN mail) - 1);

ALTER TABLE users ALTER COLUMN account_name SET NOT NULL;

CREATE UNIQUE INDEX users_account_name_index ON users (account_name);
Loading