rathena/sql-files/upgrades/upgrade_20200604.sql
Lemongrass3110 3ab1ada8d9
Removed account gender (#5006)
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.
2020-06-04 17:23:50 +02:00

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
;