diff --git a/src/main/resources/scripts/V3_3_0_1__add_user_account_name.sql b/src/main/resources/scripts/V3_3_0_1__add_user_account_name.sql index 0ae164ec..c073a82f 100644 --- a/src/main/resources/scripts/V3_3_0_1__add_user_account_name.sql +++ b/src/main/resources/scripts/V3_3_0_1__add_user_account_name.sql @@ -1,7 +1 @@ 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); \ No newline at end of file