
Adds an upgrade script to change all existing entries to the respective gender in their account. Cleanup of a few strange design decisions in the character server code. Removed SEX_ACCOUNT. Thanks to @Daegaladh for his help.
14 lines
212 B
SQL
14 lines
212 B
SQL
UPDATE `char` `c`
|
|
INNER JOIN `login` `l`
|
|
ON `l`.`account_id` = `c`.`account_id`
|
|
SET `c`.`sex` = `l`.`sex`
|
|
WHERE
|
|
`c`.`sex` = 'U'
|
|
AND
|
|
`l`.`sex` <> 'S'
|
|
;
|
|
|
|
ALTER TABLE `char`
|
|
MODIFY `sex` ENUM('M','F') NOT NULL
|
|
;
|