1
2-- Create the new assignee table
3CREATE TABLE task_assignees (page, md5, user);
4
5-- Fillin the valid users
6INSERT INTO task_assignees (page, md5, user) SELECT page,md5,user FROM tasks WHERE user != '';
7
8-- Remove the user column from tasks
9CREATE TABLE tasks_tmp ( page, md5, date, text , creator , pos );
10INSERT INTO tasks_tmp SElECT page, md5, date, text , creator , pos FROM tasks;
11DROP TABLE tasks;
12
13CREATE TABLE tasks ( page, md5, date, text , creator , pos);
14INSERT INTO tasks SElECT page, md5, date, text , creator , pos FROM tasks_tmp;
15DROP TABLE tasks_tmp;