From 80537e75f2186ae018162ad44d714d5a0f11fc16 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 14 Jul 2010 18:57:00 +0000 Subject: [PATCH] Add a field so we can record email->username linkage --- db/db.code.version.txt | 2 +- db/db.update.202.sql | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 db/db.update.202.sql diff --git a/db/db.code.version.txt b/db/db.code.version.txt index 3bc92d44..8f897c85 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -201 +202 diff --git a/db/db.update.202.sql b/db/db.update.202.sql new file mode 100644 index 00000000..f45f93d3 --- /dev/null +++ b/db/db.update.202.sql @@ -0,0 +1,4 @@ +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`; +