Files
aowow/setup/sql/updates/1753572319_01.sql
Sarjuuk 647be4a946 Setup/SQL
* move sql files into its own folder.
 * move outdated updates out of the update folder, sorted by github tags
 * split up the db dump so my editor doesn't try to hang itself if i dare to touch that file
2025-09-25 18:44:48 +02:00

15 lines
801 B
SQL

ALTER TABLE `aowow_account`
DROP INDEX `user`,
CHANGE COLUMN `user` `login` varchar(64) NOT NULL DEFAULT '' COMMENT 'only used for login',
CHANGE COLUMN `displayName` `username` varchar(64) NOT NULL COMMENT 'unique; used for for links and display',
MODIFY COLUMN `email` varchar(64) DEFAULT NULL COMMENT 'unique; can be used for login if AUTH_SELF and can be NULL if not',
MODIFY COLUMN `token` varchar(40) DEFAULT NULL COMMENT 'identification key for changes to account',
ADD COLUMN `updateValue` varchar(128) DEFAULT NULL COMMENT 'temp store for new passHash / email' AFTER `token`,
ADD CONSTRAINT `username` UNIQUE (`username`);
UPDATE `aowow_account`
SET `email` = NULL WHERE `email` = '';
ALTER TABLE `aowow_account`
ADD CONSTRAINT `email` UNIQUE (`email`);