science-ation/db/db.update.202.sql

5 lines
234 B
SQL

ALTER TABLE `accounts` ADD `link_username_to_email` ENUM( 'yes', 'no' ) NOT NULL AFTER `username` ;
UPDATE `accounts` SET `link_username_to_email`='yes';
UPDATE `accounts` SET `link_username_to_email`='no' WHERE `username`!=`email`;