-- 2007-02-10 --merdan  (delete users that are not used anymore) 
DELETE FROM `users` WHERE CONVERT( `id` USING utf8 ) = '7fdda954-fce4-be61-2a85-44feb0eed794' LIMIT 1 ;
DELETE FROM `users` WHERE CONVERT( `id` USING utf8 ) = '50a50837-6fc3-e578-231e-44feb230dfce' LIMIT 1 ;
DELETE FROM `users` WHERE CONVERT( `id` USING utf8 ) = '78470980-4e00-f5e2-0f12-44feb4237e77' LIMIT 1 ;
DELETE FROM `users` WHERE CONVERT( `id` USING utf8 ) = '8dec832e-a2f2-2bf6-a289-44feb69562ef' LIMIT 1 ;
DELETE FROM `users` WHERE CONVERT( `id` USING utf8 ) = '70a90479-d251-822f-d764-44feb7dc90fa' LIMIT 1 ;

-- begin  ----  this is just a backup 
INSERT INTO `users` VALUES ('7fdda954-fce4-be61-2a85-44feb0eed794', 'ginza-office', 'giROFPtVU.tJ.', '3253ec058e7ed758599b75ca98a3bbad', 'off', '0', NULL, '2006-09-06 11:29:03', '2007-01-30 19:29:17', '1', '1', 'Inactive', 'YTozMjp7czo4OiJncmlkbGluZSI7czozOiJvZmYiO3M6MTI6Im1haWxtZXJnZV9vbiI7czozOiJvZmYiO3M6MTI6ImRpc3BsYXlfdGFicyI7YToxMTp7aTowO3M6ODoiQ2FsZW5kYXIiO2k6MTtzOjY6IkNvdXJzZSI7aToyO3M6NzoiU3R1ZGVudCI7aTozO3M6NzoiVGVhY2hlciI7aTo0O3M6ODoiQ29udGFjdHMiO2k6NTtzOjg6IlJlc291cmNlIjtpOjY7czo2OiJFbWFpbHMiO2k6NztzOjU6IktlaXJpIjtpOjg7czo0OiJNYWluIjtpOjk7czoxMDoiU01TUmVwb3J0cyI7aToxMDtzOjc6IlNNU0hlbHAiO31zOjk6ImhpZGVfdGFicyI7YTowOnt9czoxMToicmVtb3ZlX3RhYnMiO2E6MDp7fXM6MjoidXQiO3M6MToiMSI7czoxMzoibWFpbF9mcm9tbmFtZSI7czo5OiJUZWNobm9TTVMiO3M6MTY6Im1haW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GFjdHMubGFzdF9uYW1lLCBjb250YWN0cy5maXJzdF9uYW1lIjtzOjMxOiJDb3Vyc2VfUkVTT1VSQ0VfQ1VTVE9NX09SREVSX0JZIjtzOjMyOiJyZXNvdXJjZS5jYXRlZ29yeSwgcmVzb3VyY2UubmFtZSI7czoyNToiQ29udGFjdHNfQ09OVEFDVF9PUkRFUl9CWSI7czo4OiJzbXNncm91cCI7czoyNjoiU3lsbGFidXNfU1lMTEFCVVNfT1JERVJfQlkiO3M6MzA6InNtc19zeWxsYWJ1cy5kYXRlX2VudGVyZWQgREVTQyI7czo4OiJUZWFjaGVyUSI7YToxMjp7czo5OiJsYXN0X25hbWUiO3M6MDoiIjtzOjEwOiJmaXJzdF9uYW1lIjtzOjA6IiI7czo2OiJhY3Rpb24iO3M6NToiaW5kZXgiO3M6NToicXVlcnkiO3M6NDoidHJ1ZSI7czo2OiJtb2R1bGUiO3M6NzoiVGVhY2hlciI7czoxMzoiZXhwb3J0X2J1dHRvbiI7czoxOiIwIjtzOjE3OiJsaXN0dmlld19jYWxlbmRhciI7czo0OiJ0cnVlIjtzOjE4OiJsYXN0X25hbWVfZnVyaWdhbmEiO3M6MDoiIjtzOjE5OiJmaXJzdF9uYW1lX2Z1cmlnYW5hIjtzOjA6IiI7czo5OiJzY2hvb2xfaWQiO3M6MTI6InNzc3Nzc3MtMTExMSI7czoxNDoiY29udGFjdF9zdGF0dXMiO3M6MDoiIjtzOjY6ImJ1dHRvbiI7czoxNzoiIOOCq+ODrOODs+ODgOODvCAiO319', 0, 0, 0, 'c4190619-769c-e88a-e599-4445089cb772', 'staff');
INSERT INTO `users` VALUES ('50a50837-6fc3-e578-231e-44feb230dfce', 'Little-Steps', 'Lizo5xs5.iEoU', 'cdc3a24e25b1e239e7d1fb4cd46d202a', 'off', '0', NULL, '2006-09-06 11:36:58', '2007-01-30 19:28:56', '1', '1', 'Inactive', 'YToxNzp7czo4OiJncmlkbGluZSI7czozOiJvZmYiO3M6MTI6Im1haWxtZXJn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2OiJTTVNDb3Vuc2VsaW5nX1NNU0NPVU5TRUxJTkdfT1JERVJfQlkiO3M6MjE6InNtc2V2ZW50LmRhdGVfZW50ZXJlZCI7czoyNzoiUHJvZHVjdF9GRUVfQ1VTVE9NX09SREVSX0JZIjtzOjQ2OiJzbXNfZmVlLnNlbGxfZGF0ZSBERVNDIGNvbnRhY3RzLmxhc3RfbmFtZSBBU0MgIjt9', 0, 0, 0, '320de4f2-058c-bd9a-7fb4-44ad26eef94c', 'staff');
INSERT INTO `users` VALUES ('78470980-4e00-f5e2-0f12-44feb4237e77', 'ginza-teacher', 'gi3kAicbjTQBM', '9471b75d36d73075c7e9c3f7e7c7c5ac', 'off', '0', NULL, '2006-09-06 11:44:30', '2007-01-30 19:29:37', '1', '1', 'Inactive', 'YToxMTp7czo4OiJncmlkbGluZSI7czozOiJvZmYiO3M6MTI6Im1haWxtZXJnZV9vbiI7czozOiJvZmYiO3M6MTI6ImRpc3BsYXlfdGFicyI7YToxMTp7aTowO3M6ODoiQ2FsZW5kYXIiO2k6MTtzOjY6IkNvdXJzZSI7aToyO3M6NzoiU3R1ZGVudCI7aTozO3M6NzoiVGVhY2hlciI7aTo0O3M6ODoiQ29udGFjdHMiO2k6NTtzOjg6IlJlc291cmNlIjtpOjY7czo2OiJFbWFpbHMiO2k6NztzOjU6IktlaXJpIjtpOjg7czo0OiJNYWluIjtpOjk7czoxMDoiU01TUmVwb3J0cyI7aToxMDtzOjc6IlNNU0hlbHAiO31zOjk6ImhpZGVfdGFicyI7YTowOnt9czoxMToicmVtb3ZlX3RhYnMiO2E6MDp7fXM6MjoidXQiO3M6MToiMSI7czoxMzoibWFpbF9mcm9tbmFtZSI7czo5OiJUZWNobm9TTVMiO3M6MTY6Im1haWxfZnJvbWFkZHJlc3MiO3M6MjQ6InRlY2hub3Ntc0B0ZWNobm9waWFuLmNvbSI7czoxNzoibWFpbF9zbXRwYXV0aF9yZXEiO3M6MDoiIjtzOjE2OiJtYWlsX3BvcGF1dGhfcmVxIjtzOjA6IiI7czo5OiJsYXN0VGhlbWUiO3M6NToiU3VnYXIiO30=', 0, 0, 0, 'e066c6ad-aa2a-9e31-95f1-445643b2f675', 'teacher');
INSERT INTO `users` VALUES ('8dec832e-a2f2-2bf6-a289-44feb69562ef', 'omote-office', 'omtNHnyRWsz5M', '15e2a858504d8f4128b669fd9ea2f198', 'off', '0', NULL, '2006-09-06 11:52:30', '2007-01-30 19:30:27', '1', '1', 'Inactive', 'YTozNTp7czo4OiJncmlkbGluZSI7czozOiJvZmYiO3M6MTI6Im1haWxtZXJnZV9vbiI7czozOiJvZmYiO3M6MTI6ImRpc3BsYXlfdGFicyI7YToxMTp7aTowO3M6ODoiQ2FsZW5kYXIiO2k6MTtzOjY6IkNvdXJzZSI7aToyO3M6NzoiU3R1ZGVudCI7aTozO3M6NzoiVGVhY2hlciI7aTo0O3M6ODoiQ29udGFjdHMiO2k6NTtzOjg6IlJlc291cmNlIjtpOjY7czo2OiJFbWFpbHMiO2k6NztzOjU6IktlaXJpIjtpOjg7czo0OiJNYWluIjtpOjk7czoxMDoiU01TUmVwb3J0cyI7aToxMDtzOjc6IlNNU0hlbHAiO31zOjk6ImhpZGVfdGFicyI7YTowOnt9czoxMToicmVtb3ZlX3RhYnMiO2E6MDp7fXM6MjoidXQiO3M6MToiMSI7czoxMzoibWFpbF9mcm9tbmFtZSI7czo5OiJUZWNobm9TTVMiO3M6MTY6Im1haWxfZnJvbWFkZHJlc3MiO3M6MjQ6InRlY2hub3Ntc0B0ZWNobm9waWFuLmNvbSI7czoxNzoibWFpbF9zbXRwYXV0aF9yZXEiO3M6MDoiIjtzOjE2OiJtYWlsX3BvcGF1dGhfcmVxIjtzOjA6IiI7czo5OiJsYXN0VGhlbWUiO3M6NToiU3VnYXIiO3M6MjQ6IlN0dWRlbnRfU1RVREVOVF9PUkRFUl9CWSI7czoxODoiYXNzaWduZWRfdXNlcl9uYW1lIjtzOjI0OiJUZWFjaGVyX1RFQUNIRVJfT1JERVJfQl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cb0-4179-e97d-0e3e-44a8652ad300', 'staff');
INSERT INTO `users` VALUES ('70a90479-d251-822f-d764-44feb7dc90fa', 'omote-teacher', 'omeYkB/gXYLEA', '6ebdae4844eefc2c29cea6cc8b2b8606', 'off', '0', NULL, '2006-09-06 11:57:22', '2007-01-30 19:30:58', '1', '1', 'Inactive', 'YToxMjp7czo4OiJncmlkbGluZSI7czozOiJvZmYiO3M6MTI6Im1haWxtZXJnZV9vbiI7czozOiJvZmYiO3M6MTI6ImRpc3BsYXlfdGFicyI7YToxMTp7aTowO3M6ODoiQ2FsZW5kYXIiO2k6MTtzOjY6IkNvdXJzZSI7aToyO3M6NzoiU3R1ZGVudCI7aTozO3M6NzoiVGVhY2hlciI7aTo0O3M6ODoiQ29udGFjdHMiO2k6NTtzOjg6IlJlc291cmNlIjtpOjY7czo2OiJFbWFpbHMiO2k6NztzOjU6IktlaXJpIjtpOjg7czo0OiJNYWluIjtpOjk7czoxMDoiU01TUmVwb3J0cyI7aToxMDtzOjc6IlNNU0hlbHAiO31zOjk6ImhpZGVfdGFicyI7YTowOnt9czoxMToicmVtb3ZlX3RhYnMiO2E6MDp7fXM6MjoidXQiO3M6MToiMSI7czoxMzoibWFpbF9mcm9tbmFtZSI7czo5OiJUZWNobm9TTVMiO3M6MTY6Im1haWxfZnJvbWFkZHJlc3MiO3M6MjQ6InRlY2hub3Ntc0B0ZWNobm9waWFuLmNvbSI7czoxNzoibWFpbF9zbXRwYXV0aF9yZXEiO3M6MDoiIjtzOjE2OiJtYWlsX3BvcGF1dGhfcmVxIjtzOjA6IiI7czoyNDoiU3R1ZGVudF9TVFVERU5UX09SREVSX0JZIjtzOjM5OiJjb250YWN0cy5sYXN0X25hbWUsIGNvbnRhY3RzLmZpcnN0X25hbWUiO3M6OToibGFzdFRoZW1lIjtzOjU6IlN1Z2FyIjt9', 0, 0, 0, '4a0cca56-18a4-a47d-f834-44a865b2452b', 'teacher');
-- end ----  this is just a backup 

-- move yokohama students to omotesando branch
UPDATE contacts set school_id='483794c4-adee-a607-f685-4441c943a1e2' 
where school_id='sssssss-1111' and contact_status=5;

-- move yokohama students to omotesando branch
UPDATE contacts set school_id='483794c4-adee-a607-f685-4441c943a1e2' 
where school_id='sssssss-1111' and contact_status=12;


-- 2007-12-01 grade correction metehan

UPDATE contacts SET grade_entrance_date=NULL WHERE grade_entrance_date IS NOT NULL AND smsgroup = 'student' AND deleted =0 AND grade IS NULL ;
UPDATE contacts SET grade=NULL, grade_entrance_date=NULL WHERE grade_entrance_date IS NOT NULL AND smsgroup = 'student' AND deleted =0 AND grade = '' ;
UPDATE contacts SET grade=NULL WHERE smsgroup = 'student' AND deleted =0 AND grade < 1 AND grade_entrance_date IS NULL ;
UPDATE contacts c, `contacts-2007-12-01` c2 SET c.grade='00', c.grade_entrance_date=c2.grade_entrance_date
	WHERE c2.smsgroup = 'student' AND c2.grade_entrance_date IS NOT NULL  AND c2.grade = '' AND c2. deleted =0 AND c.id = c2.id ;
UPDATE contacts SET grade='00' WHERE smsgroup = 'student' AND deleted =0 AND grade = '0' AND grade_entrance_date IS NOT NULL ;


	SELECT id, last_name, first_name, idnumber, birthdate, grade, grade_entrance_date, school_id, date_entered, date_modified, date_entered
FROM `contacts` 
WHERE smsgroup = 'student'
AND deleted =0
AND grade = '0'
ORDER BY contacts.grade ASC , grade_entrance_date DESC 

-- 2011-02-18 grade updates

ALTER TABLE `contacts` ADD `grade_entered` VARCHAR( 10 ) NOT NULL AFTER `grade` ;
UPDATE contacts SET grade_entered=grade WHERE smsgroup='student' ; 

-- calculate new current grade from original grade entered, month of grade change is April 
UPDATE contacts SET grade=grade_entered + (2011-SUBSTRING(grade_entrance_date, 1, 4)) WHERE smsgroup='student' AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken') AND SUBSTRING(grade_entrance_date, 6, 2) < 4  AND date_modified > '2008-01-01' ;
UPDATE contacts SET grade=grade_entered + (2010-SUBSTRING(grade_entrance_date, 1, 4)) WHERE smsgroup='student' AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken') AND SUBSTRING(grade_entrance_date, 6, 2) >= 4 AND date_modified > '2008-01-01' ;

UPDATE contacts SET grade=15 WHERE smsgroup='student' AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken') AND grade > 15 AND date_modified > '2008-01-01' ;


-- little steps grade update
SELECT DISTINCT grade FROM contacts WHERE grade NOT IN ('00', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') ;

SELECT last_name, grade, grade_entrance_date, grade_entered FROM contacts WHERE grade IN ('00', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') ;

SELECT last_name, grade, grade_entrance_date, grade_entered FROM contacts 
WHERE grade IN ('00', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') AND grade=grade_entered AND grade_entrance_date <'2010-04-01'

UPDATE contacts SET grade=grade_entered + (2011-SUBSTRING(grade_entrance_date, 1, 4)) 
WHERE smsgroup='student' AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken') AND SUBSTRING(grade_entrance_date, 6, 2) < 4 
	AND grade IN ('00', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') AND grade=grade_entered AND grade_entrance_date <'2010-04-01' ;

UPDATE contacts SET grade=grade_entered + (2010-SUBSTRING(grade_entrance_date, 1, 4)) 
WHERE smsgroup='student' AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken') AND SUBSTRING(grade_entrance_date, 6, 2) >= 4 
	AND grade IN ('00', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') AND grade=grade_entered AND grade_entrance_date <'2010-04-01' ;


UPDATE contacts SET grade=grade+1 WHERE smsgroup='student' AND grade IS NOT NULL AND grade!=''
	AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken', '15') AND grade_entrance_date < '2011-04-01'
	AND grade IN ('00', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15') ;
	
SELECT last_name, grade, grade_entrance_date, grade_entered FROM contacts WHERE grade > 15

UPDATE contacts SET grade=15 WHERE smsgroup='student' AND grade NOT IN ('general', 'general1', 'general2', 'general3', 'eiken') AND grade > 15 ; 

-- 2012-01-05
-- db changes for update
-- from  ALTER TABLE `combini_history` DROP `branch_id`;
