From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- setup/upgrade/0.9.9.2/flyspray-install.xml | 1049 ++++++++++++++++++++ setup/upgrade/0.9.9.2/lowercase_emails.php | 6 + setup/upgrade/0.9.9.2/update_users.xml | 70 ++ setup/upgrade/0.9.9.2/upgrade.info | 34 + setup/upgrade/0.9.9.4/flyspray-install.xml | 1055 ++++++++++++++++++++ setup/upgrade/0.9.9.4/upgrade.info | 32 + setup/upgrade/0.9.9.4/upgrade.xml | 199 ++++ setup/upgrade/0.9.9.5/flyspray-install.xml | 1058 +++++++++++++++++++++ setup/upgrade/0.9.9.5/upgrade.info | 34 + setup/upgrade/0.9.9.5/upgrade.xml | 41 + setup/upgrade/0.9.9.7/flyspray-install.xml | 1059 +++++++++++++++++++++ setup/upgrade/0.9.9.7/upgrade.info | 35 + setup/upgrade/0.9.9/add_data.php | 34 + setup/upgrade/0.9.9/add_duplicates.php | 41 + setup/upgrade/0.9.9/add_searches.php | 22 + setup/upgrade/0.9.9/clean_unique.php | 67 ++ setup/upgrade/0.9.9/convert_categories.php | 43 + setup/upgrade/0.9.9/convert_private.php | 26 + setup/upgrade/0.9.9/flyspray-begin.xml | 748 +++++++++++++++ setup/upgrade/0.9.9/flyspray-final.xml | 976 +++++++++++++++++++ setup/upgrade/0.9.9/flyspray-install.xml | 1044 ++++++++++++++++++++ setup/upgrade/0.9.9/rename_columns.php | 14 + setup/upgrade/0.9.9/upgrade.info | 44 + setup/upgrade/0.9.9/upgrade_assignments.php | 31 + setup/upgrade/1.0/datadict-postgres.inc.php | 606 ++++++++++++ setup/upgrade/1.0/flyspray-install.xml | 1373 +++++++++++++++++++++++++++ setup/upgrade/1.0/upgrade.info | 70 ++ setup/upgrade/1.0/upgrade.xml | 902 ++++++++++++++++++ setup/upgrade/1.0/varchartotext.php | 17 + 29 files changed, 10730 insertions(+) create mode 100644 setup/upgrade/0.9.9.2/flyspray-install.xml create mode 100644 setup/upgrade/0.9.9.2/lowercase_emails.php create mode 100644 setup/upgrade/0.9.9.2/update_users.xml create mode 100644 setup/upgrade/0.9.9.2/upgrade.info create mode 100644 setup/upgrade/0.9.9.4/flyspray-install.xml create mode 100644 setup/upgrade/0.9.9.4/upgrade.info create mode 100644 setup/upgrade/0.9.9.4/upgrade.xml create mode 100644 setup/upgrade/0.9.9.5/flyspray-install.xml create mode 100644 setup/upgrade/0.9.9.5/upgrade.info create mode 100644 setup/upgrade/0.9.9.5/upgrade.xml create mode 100644 setup/upgrade/0.9.9.7/flyspray-install.xml create mode 100644 setup/upgrade/0.9.9.7/upgrade.info create mode 100644 setup/upgrade/0.9.9/add_data.php create mode 100644 setup/upgrade/0.9.9/add_duplicates.php create mode 100644 setup/upgrade/0.9.9/add_searches.php create mode 100644 setup/upgrade/0.9.9/clean_unique.php create mode 100644 setup/upgrade/0.9.9/convert_categories.php create mode 100644 setup/upgrade/0.9.9/convert_private.php create mode 100644 setup/upgrade/0.9.9/flyspray-begin.xml create mode 100644 setup/upgrade/0.9.9/flyspray-final.xml create mode 100644 setup/upgrade/0.9.9/flyspray-install.xml create mode 100644 setup/upgrade/0.9.9/rename_columns.php create mode 100644 setup/upgrade/0.9.9/upgrade.info create mode 100644 setup/upgrade/0.9.9/upgrade_assignments.php create mode 100644 setup/upgrade/1.0/datadict-postgres.inc.php create mode 100644 setup/upgrade/1.0/flyspray-install.xml create mode 100644 setup/upgrade/1.0/upgrade.info create mode 100644 setup/upgrade/1.0/upgrade.xml create mode 100644 setup/upgrade/1.0/varchartotext.php (limited to 'setup/upgrade') diff --git a/setup/upgrade/0.9.9.2/flyspray-install.xml b/setup/upgrade/0.9.9.2/flyspray-install.xml new file mode 100644 index 0000000..eac0638 --- /dev/null +++ b/setup/upgrade/0.9.9.2/flyspray-install.xml @@ -0,0 +1,1049 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + + + task_id + user_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_tense + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+ + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + + + + + + + + + + + + + + + + +
+ + INSERT INTO groups VALUES (DEFAULT, 'Admin', 'Members have unlimited access to all functionality.', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Developers', 'Global Developers for all projects', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Reporters', 'Open new tasks / add comments in all projects', 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Basic', 'Members can login, relying upon Project permissions only', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Pending', 'Users who are awaiting approval of their accounts.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + INSERT INTO groups VALUES (DEFAULT, 'Project Managers', 'Permission to do anything related to the Default Project.', 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1); + INSERT INTO history VALUES (DEFAULT, 1, 1, 1130024797, 1, '', '', ''); + INSERT INTO list_category VALUES (DEFAULT, 1, 'Backend / Core', 1, 0, 2, 3); + INSERT INTO list_category VALUES (DEFAULT, 0, 'root', 0, 0, 1, 2); + INSERT INTO list_category VALUES (DEFAULT, 1, 'root', 0, 0, 1, 4); + INSERT INTO list_os VALUES (DEFAULT, 1, 'All', 1, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Windows', 2, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Linux', 3, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Mac OS', 4, 1); + INSERT INTO list_resolution VALUES (DEFAULT, 'Not a bug', 1, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t fix', 2, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t implement', 3, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Works for me', 4, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Deferred', 5, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Duplicate', 6, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Fixed', 7, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Implemented', 8, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Bug Report', 1, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Feature Request', 2, 1, 0); + INSERT INTO list_version VALUES (DEFAULT, 1, 'Development', 1, 1, 2); + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0) + INSERT INTO prefs VALUES (DEFAULT, 'fs_ver', '0.9.9'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_port', '5222'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_username', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_password', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_group', '4'); + INSERT INTO prefs VALUES (DEFAULT, 'user_notify', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'admin_email', 'flyspray@example.com'); + INSERT INTO prefs VALUES (DEFAULT, 'lang_code', 'en'); + INSERT INTO prefs VALUES (DEFAULT, 'spam_proof', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_project', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat', ''); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat_extended', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_reg', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'global_theme', 'CleanFS'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_columns', 'id project category tasktype severity summary status progress'); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_user', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_pass', ''); + INSERT INTO prefs VALUES (DEFAULT, 'page_title', 'Flyspray::'); + INSERT INTO prefs VALUES (DEFAULT, 'notify_registration', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_ssl', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'last_update_check', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'cache_feeds', '1'); + INSERT INTO projects VALUES (DEFAULT, 'Default Project', 'CleanFS', 0, 'Welcome to your first Flyspray project! We hope that Flyspray provides you with many hours of increased productivity. If you have any issues, go to http://flyspray.org/support. You can customise this message by clicking the **Manage Project** link in the menu above...', 1, 'id category tasktype severity summary status progress', 1, 0, '', '', NULL, '0', NULL, NULL, '', 'en', 0, 0, 0, NULL, 'index'); + INSERT INTO tasks VALUES (1, 1, 1, 1130024797, 1, 0, 0, 0, ' ', 'Sample Task', 'This isn''t a real task. You should close it and start opening some real tasks.', 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, '', '0'); + INSERT INTO users VALUES (DEFAULT, 'super', '1b3231655cebb7a1f783eddf27d254ca', 'Mr Super User', 'super@example.com', 'super@example.com', 0, 1, 1, '', '', 25, 0, 0, 0, 0, 0); + INSERT INTO users_in_groups VALUES (DEFAULT, 1, 1); + +
diff --git a/setup/upgrade/0.9.9.2/lowercase_emails.php b/setup/upgrade/0.9.9.2/lowercase_emails.php new file mode 100644 index 0000000..24fd28e --- /dev/null +++ b/setup/upgrade/0.9.9.2/lowercase_emails.php @@ -0,0 +1,6 @@ +query('UPDATE {users} SET email_address = LOWER(email_address), jabber_id = LOWER(jabber_id)'); + +?> + diff --git a/setup/upgrade/0.9.9.2/update_users.xml b/setup/upgrade/0.9.9.2/update_users.xml new file mode 100644 index 0000000..591a1bb --- /dev/null +++ b/setup/upgrade/0.9.9.2/update_users.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+
\ No newline at end of file diff --git a/setup/upgrade/0.9.9.2/upgrade.info b/setup/upgrade/0.9.9.2/upgrade.info new file mode 100644 index 0000000..4ea91dd --- /dev/null +++ b/setup/upgrade/0.9.9.2/upgrade.info @@ -0,0 +1,34 @@ +[defaultupgrade] +1="update_users.xml" +2="lowercase_emails.php" + + +[develupgrade] +1="update_users.xml" + +[fsprefs] +fs_ver="0.9.7" ; doesn't matter which version +jabber_server="" +jabber_port="5222" +jabber_username="" +jabber_password="" +anon_group="0" +user_notify="1" +admin_email="flyspray@example.com" +lang_code="en" +spam_proof="1" +default_project="1" +dateformat="" +dateformat_extended="" +anon_reg="1" +page_title="Flyspray:: " +notify_registration="0" +jabber_ssl="0" +last_update_check="0" +cache_feeds="1" +global_theme="CleanFS" +visible_columns="id project tasktype severity summary status progress" +smtp_server="" +smtp_user="" +smtp_pass="" +lock_for="5" \ No newline at end of file diff --git a/setup/upgrade/0.9.9.4/flyspray-install.xml b/setup/upgrade/0.9.9.4/flyspray-install.xml new file mode 100644 index 0000000..ae2de1d --- /dev/null +++ b/setup/upgrade/0.9.9.4/flyspray-install.xml @@ -0,0 +1,1055 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + + + task_id + user_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_tense + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+ + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + + + + + + + + + + + + + + + + +
+ + INSERT INTO groups VALUES (DEFAULT, 'Admin', 'Members have unlimited access to all functionality.', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Developers', 'Global Developers for all projects', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Reporters', 'Open new tasks / add comments in all projects', 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Basic', 'Members can login, relying upon Project permissions only', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Pending', 'Users who are awaiting approval of their accounts.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + INSERT INTO groups VALUES (DEFAULT, 'Project Managers', 'Permission to do anything related to the Default Project.', 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1); + INSERT INTO history VALUES (DEFAULT, 1, 1, 1130024797, 1, '', '', ''); + INSERT INTO list_category VALUES (DEFAULT, 1, 'Backend / Core', 1, 0, 2, 3); + INSERT INTO list_category VALUES (DEFAULT, 0, 'root', 0, 0, 1, 2); + INSERT INTO list_category VALUES (DEFAULT, 1, 'root', 0, 0, 1, 4); + INSERT INTO list_os VALUES (DEFAULT, 1, 'All', 1, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Windows', 2, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Linux', 3, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Mac OS', 4, 1); + INSERT INTO list_resolution VALUES (DEFAULT, 'Not a bug', 1, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t fix', 2, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t implement', 3, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Works for me', 4, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Deferred', 5, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Duplicate', 6, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Fixed', 7, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Implemented', 8, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Bug Report', 1, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Feature Request', 2, 1, 0); + INSERT INTO list_version VALUES (DEFAULT, 1, 'Development', 1, 1, 2); + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0) + INSERT INTO prefs VALUES (DEFAULT, 'fs_ver', '0.9.9'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_port', '5222'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_username', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_password', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_group', '4'); + INSERT INTO prefs VALUES (DEFAULT, 'user_notify', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'admin_email', 'flyspray@example.com'); + INSERT INTO prefs VALUES (DEFAULT, 'lang_code', 'en'); + INSERT INTO prefs VALUES (DEFAULT, 'spam_proof', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_project', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat', ''); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat_extended', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_reg', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'global_theme', 'CleanFS'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_columns', 'id project category tasktype severity summary status progress'); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_user', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_pass', ''); + INSERT INTO prefs VALUES (DEFAULT, 'page_title', 'Flyspray::'); + INSERT INTO prefs VALUES (DEFAULT, 'notify_registration', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_ssl', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'last_update_check', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'cache_feeds', '1'); + INSERT INTO projects VALUES (DEFAULT, 'Default Project', 'CleanFS', 0, 'Welcome to your first Flyspray project! We hope that Flyspray provides you with many hours of increased productivity. If you have any issues, go to http://flyspray.org/support. You can customise this message by clicking the **Manage Project** link in the menu above...', 1, 'id category tasktype severity summary status progress', 1, 0, '', '', NULL, '0', NULL, NULL, '', 'en', 0, 0, 0, NULL, 'index'); + INSERT INTO tasks VALUES (1, 1, 1, 1130024797, 1, 0, 0, 0, ' ', 'Sample Task', 'This isn''t a real task. You should close it and start opening some real tasks.', 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, '', '0'); + INSERT INTO users VALUES (DEFAULT, 'super', '1b3231655cebb7a1f783eddf27d254ca', 'Mr Super User', 'super@example.com', 'super@example.com', 0, 1, 1, '', '', 25, 0, 0, 0, 0, 0); + INSERT INTO users_in_groups VALUES (DEFAULT, 1, 1); + +
diff --git a/setup/upgrade/0.9.9.4/upgrade.info b/setup/upgrade/0.9.9.4/upgrade.info new file mode 100644 index 0000000..3acfddb --- /dev/null +++ b/setup/upgrade/0.9.9.4/upgrade.info @@ -0,0 +1,32 @@ +[defaultupgrade] +1="upgrade.xml" + +[develupgrade] +1="upgrade.xml" + +[fsprefs] +fs_ver="0.9.7" ; doesn't matter which version +jabber_server="" +jabber_port="5222" +jabber_username="" +jabber_password="" +anon_group="0" +user_notify="1" +admin_email="flyspray@example.com" +lang_code="en" +spam_proof="1" +default_project="1" +dateformat="" +dateformat_extended="" +anon_reg="1" +page_title="Flyspray:: " +notify_registration="0" +jabber_ssl="0" +last_update_check="0" +cache_feeds="1" +global_theme="CleanFS" +visible_columns="id project tasktype severity summary status progress" +smtp_server="" +smtp_user="" +smtp_pass="" +lock_for="5" \ No newline at end of file diff --git a/setup/upgrade/0.9.9.4/upgrade.xml b/setup/upgrade/0.9.9.4/upgrade.xml new file mode 100644 index 0000000..5953d91 --- /dev/null +++ b/setup/upgrade/0.9.9.4/upgrade.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/setup/upgrade/0.9.9.5/flyspray-install.xml b/setup/upgrade/0.9.9.5/flyspray-install.xml new file mode 100644 index 0000000..11dc5ff --- /dev/null +++ b/setup/upgrade/0.9.9.5/flyspray-install.xml @@ -0,0 +1,1058 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + + + task_id + user_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_tense + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+ + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + + + + + + + + + + + + + + + + + + task_id + +
+ + INSERT INTO groups VALUES (DEFAULT, 'Admin', 'Members have unlimited access to all functionality.', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Developers', 'Global Developers for all projects', 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Reporters', 'Open new tasks / add comments in all projects', 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Basic', 'Members can login, relying upon Project permissions only', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Pending', 'Users who are awaiting approval of their accounts.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + INSERT INTO groups VALUES (DEFAULT, 'Project Managers', 'Permission to do anything related to the Default Project.', 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1); + INSERT INTO history VALUES (DEFAULT, 1, 1, 1130024797, 1, '', '', ''); + INSERT INTO list_category VALUES (DEFAULT, 1, 'Backend / Core', 1, 0, 2, 3); + INSERT INTO list_category VALUES (DEFAULT, 0, 'root', 0, 0, 1, 2); + INSERT INTO list_category VALUES (DEFAULT, 1, 'root', 0, 0, 1, 4); + INSERT INTO list_os VALUES (DEFAULT, 1, 'All', 1, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Windows', 2, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Linux', 3, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Mac OS', 4, 1); + INSERT INTO list_resolution VALUES (DEFAULT, 'Not a bug', 1, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t fix', 2, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t implement', 3, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Works for me', 4, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Deferred', 5, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Duplicate', 6, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Fixed', 7, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Implemented', 8, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Bug Report', 1, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Feature Request', 2, 1, 0); + INSERT INTO list_version VALUES (DEFAULT, 1, 'Development', 1, 1, 2); + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0) + INSERT INTO prefs VALUES (DEFAULT, 'fs_ver', '0.9.9'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_port', '5222'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_username', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_password', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_group', '4'); + INSERT INTO prefs VALUES (DEFAULT, 'user_notify', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'admin_email', 'flyspray@example.com'); + INSERT INTO prefs VALUES (DEFAULT, 'lang_code', 'en'); + INSERT INTO prefs VALUES (DEFAULT, 'spam_proof', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_project', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat', ''); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat_extended', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_reg', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'global_theme', 'CleanFS'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_columns', 'id project category tasktype severity summary status progress'); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_user', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_pass', ''); + INSERT INTO prefs VALUES (DEFAULT, 'page_title', 'Flyspray::'); + INSERT INTO prefs VALUES (DEFAULT, 'notify_registration', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_ssl', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'last_update_check', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'cache_feeds', '1'); + INSERT INTO projects VALUES (DEFAULT, 'Default Project', 'CleanFS', 0, 'Welcome to your first Flyspray project! We hope that Flyspray provides you with many hours of increased productivity. If you have any issues, go to http://flyspray.org/support. You can customise this message by clicking the **Manage Project** link in the menu above...', 1, 'id category tasktype severity summary status progress', 1, 0, '', '', NULL, '0', NULL, NULL, '', 'en', 0, 0, 0, NULL, 'index'); + INSERT INTO tasks VALUES (1, 1, 1, 1130024797, 1, 0, 0, 0, ' ', 'Sample Task', 'This isn''t a real task. You should close it and start opening some real tasks.', 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, '', '0'); + INSERT INTO users VALUES (DEFAULT, 'super', '1b3231655cebb7a1f783eddf27d254ca', 'Mr Super User', 'super@example.com', 'super@example.com', 0, 1, 1, '', '', 25, 0, 0, 0, 0, 0); + INSERT INTO users_in_groups VALUES (DEFAULT, 1, 1); + +
diff --git a/setup/upgrade/0.9.9.5/upgrade.info b/setup/upgrade/0.9.9.5/upgrade.info new file mode 100644 index 0000000..68f3208 --- /dev/null +++ b/setup/upgrade/0.9.9.5/upgrade.info @@ -0,0 +1,34 @@ +[defaultupgrade] +1="upgrade.xml" + +[develupgrade] +1="upgrade.xml" + +[fsprefs] +fs_ver="0.9.7" ; doesn't matter which version +jabber_server="" +jabber_port="5222" +jabber_username="" +jabber_password="" +anon_group="0" +user_notify="1" +admin_email="flyspray@example.com" +lang_code="en" +spam_proof="1" +default_project="1" +dateformat="" +dateformat_extended="" +anon_reg="1" +page_title="Flyspray:: " +notify_registration="0" +jabber_ssl="0" +last_update_check="0" +cache_feeds="1" +global_theme="CleanFS" +visible_columns="id project tasktype severity summary status progress" +smtp_server="" +smtp_user="" +smtp_pass="" +lock_for="5" +email_ssl="0" +email_tls="0" \ No newline at end of file diff --git a/setup/upgrade/0.9.9.5/upgrade.xml b/setup/upgrade/0.9.9.5/upgrade.xml new file mode 100644 index 0000000..f11b3c8 --- /dev/null +++ b/setup/upgrade/0.9.9.5/upgrade.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+
\ No newline at end of file diff --git a/setup/upgrade/0.9.9.7/flyspray-install.xml b/setup/upgrade/0.9.9.7/flyspray-install.xml new file mode 100644 index 0000000..10c79d1 --- /dev/null +++ b/setup/upgrade/0.9.9.7/flyspray-install.xml @@ -0,0 +1,1059 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + + + task_id + user_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_tense + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+ + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + + + + + + + + + + + + + + + + + + task_id + +
+ + INSERT INTO groups VALUES (DEFAULT, 'Admin', 'Members have unlimited access to all functionality.', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Developers', 'Global Developers for all projects', 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Reporters', 'Open new tasks / add comments in all projects', 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Basic', 'Members can login, relying upon Project permissions only', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Pending', 'Users who are awaiting approval of their accounts.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + INSERT INTO groups VALUES (DEFAULT, 'Project Managers', 'Permission to do anything related to the Default Project.', 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1); + INSERT INTO history VALUES (DEFAULT, 1, 1, 1130024797, 1, '', '', ''); + INSERT INTO list_category VALUES (DEFAULT, 1, 'Backend / Core', 1, 0, 2, 3); + INSERT INTO list_category VALUES (DEFAULT, 0, 'root', 0, 0, 1, 2); + INSERT INTO list_category VALUES (DEFAULT, 1, 'root', 0, 0, 1, 4); + INSERT INTO list_os VALUES (DEFAULT, 1, 'All', 1, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Windows', 2, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Linux', 3, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Mac OS', 4, 1); + INSERT INTO list_resolution VALUES (DEFAULT, 'Not a bug', 1, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t fix', 2, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t implement', 3, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Works for me', 4, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Deferred', 5, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Duplicate', 6, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Fixed', 7, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Implemented', 8, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Bug Report', 1, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Feature Request', 2, 1, 0); + INSERT INTO list_version VALUES (DEFAULT, 1, 'Development', 1, 1, 2); + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0) + INSERT INTO prefs VALUES (DEFAULT, 'fs_ver', '0.9.9'); + INSERT INTO prefs VALUES (DEFAULT, 'logo', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_port', '5222'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_username', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_password', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_group', '4'); + INSERT INTO prefs VALUES (DEFAULT, 'user_notify', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'admin_email', 'flyspray@example.com'); + INSERT INTO prefs VALUES (DEFAULT, 'lang_code', 'en'); + INSERT INTO prefs VALUES (DEFAULT, 'spam_proof', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_project', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat', ''); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat_extended', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_reg', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'global_theme', 'CleanFS'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_columns', 'id project category tasktype severity summary status progress'); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_user', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_pass', ''); + INSERT INTO prefs VALUES (DEFAULT, 'page_title', 'Flyspray::'); + INSERT INTO prefs VALUES (DEFAULT, 'notify_registration', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_ssl', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'last_update_check', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'cache_feeds', '1'); + INSERT INTO projects VALUES (DEFAULT, 'Default Project', 'CleanFS', 0, 'Welcome to your first Flyspray project! We hope that Flyspray provides you with many hours of increased productivity. If you have any issues, go to http://flyspray.org/support. You can customise this message by clicking the **Manage Project** link in the menu above...', 1, 'id category tasktype severity summary status progress', 1, 0, '', '', NULL, '0', NULL, NULL, '', 'en', 0, 0, 0, NULL, 'index'); + INSERT INTO tasks VALUES (1, 1, 1, 1130024797, 1, 0, 0, 0, ' ', 'Sample Task', 'This isn''t a real task. You should close it and start opening some real tasks.', 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, '', '0'); + INSERT INTO users VALUES (DEFAULT, 'super', '1b3231655cebb7a1f783eddf27d254ca', 'Mr Super User', 'super@example.com', 'super@example.com', 0, 1, 1, '', '', 25, 0, 0, 0, 0, 0); + INSERT INTO users_in_groups VALUES (DEFAULT, 1, 1); + +
diff --git a/setup/upgrade/0.9.9.7/upgrade.info b/setup/upgrade/0.9.9.7/upgrade.info new file mode 100644 index 0000000..324d70e --- /dev/null +++ b/setup/upgrade/0.9.9.7/upgrade.info @@ -0,0 +1,35 @@ +[defaultupgrade] +;1="upgrade.xml" + +[develupgrade] +;1="upgrade.xml" + +[fsprefs] +fs_ver="0.9.7" ; doesn't matter which version +jabber_server="" +jabber_port="5222" +jabber_username="" +jabber_password="" +anon_group="0" +user_notify="1" +admin_email="flyspray@example.com" +lang_code="en" +spam_proof="1" +default_project="1" +dateformat="" +dateformat_extended="" +anon_reg="1" +page_title="Flyspray:: " +notify_registration="0" +jabber_ssl="0" +last_update_check="0" +cache_feeds="1" +global_theme="CleanFS" +visible_columns="id project tasktype severity summary status progress" +smtp_server="" +smtp_user="" +smtp_pass="" +lock_for="5" +email_ssl="0" +email_tls="0" +default_timezone="0" \ No newline at end of file diff --git a/setup/upgrade/0.9.9/add_data.php b/setup/upgrade/0.9.9/add_data.php new file mode 100644 index 0000000..8c32d38 --- /dev/null +++ b/setup/upgrade/0.9.9/add_data.php @@ -0,0 +1,34 @@ +query('SELECT count(*) FROM {list_status}'); +if ($db->fetchOne($sql) < 1) { + $db->query("INSERT INTO {list_status} (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0)"); + $db->query("INSERT INTO {list_status} (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0)"); + $db->query("INSERT INTO {list_status} (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0)"); + $db->query("INSERT INTO {list_status} (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0)"); + $db->query("INSERT INTO {list_status} (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0)"); + $db->query("INSERT INTO {list_status} (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0)"); +} + +if (Post::val('replace_resolution')) { + $db->query('UPDATE {list_resolution} SET resolution_name = ? WHERE resolution_id = ?', array('Duplicate (the real one)', 6)); +} + +$db->query("DELETE FROM {list_status} WHERE status_id = 7"); +$db->query("DELETE FROM {notifications} WHERE user_id = 0 OR task_id = 0"); + +$db->query("UPDATE {tasks} SET closure_comment='' WHERE closure_comment='0'"); +$db->query("UPDATE {groups} SET add_to_assignees = '1' WHERE assign_others_to_self =1 "); +$db->query("UPDATE {groups} SET add_votes = 1 WHERE group_id = 2 OR group_id = 3 OR group_id = 6"); +$db->query("UPDATE {groups} SET edit_assignments = '1' WHERE group_id = 2"); +$db->query("UPDATE {history} SET event_type = 3 WHERE event_type = 0"); +$db->query("UPDATE {history} SET event_type = 11 WHERE event_type = 15"); +$db->query("UPDATE {history} SET event_type = 12 WHERE event_type = 16"); +$db->query("UPDATE {history} SET field_changed = 'project_id' WHERE field_changed = 'attached_to_project'"); + +?> diff --git a/setup/upgrade/0.9.9/add_duplicates.php b/setup/upgrade/0.9.9/add_duplicates.php new file mode 100644 index 0000000..4a00a8a --- /dev/null +++ b/setup/upgrade/0.9.9/add_duplicates.php @@ -0,0 +1,41 @@ +query('SELECT task_id, closure_comment, resolution_reason FROM {tasks}'); + +while ($row = $db->fetchRow($check_sql)) +{ + if ($row['resolution_reason'] == 6) { + preg_match("/\b(?:FS#|bug )(\d+)\b/", $row['closure_comment'], $dupe_of); + if (count($dupe_of)) { + $existing = $db->query('SELECT * FROM {related} WHERE this_task = ? AND related_task = ? AND is_duplicate = 1', + array($row['task_id'], $dupe_of[1])); + + if ($db->countRows($existing) == 0) { + $db->query('INSERT INTO {related} (this_task, related_task, is_duplicate) VALUES(?,?,1)', + array($row['task_id'], $dupe_of[1])); + echo $row['task_id'] . ' is a duplicate of ' . $dupe_of[1] . '.
'; + } + } + } +} + +$check_sql = $db->query('SELECT this_task, related_task FROM {related} WHERE is_duplicate = 0'); +$deleted = array(); + +while ($row = $db->fetchRow($check_sql)) +{ + $existing = $db->query('SELECT related_id FROM {related} WHERE this_task = ? AND related_task = ? AND is_duplicate = 0', + array($row['related_task'], $row['this_task'])); + + if ($db->countRows($existing) == 1 && !isset($deleted[$row['related_task'].'-'.$row['this_task']])) { + $deleted[$row['this_task'].'-'.$row['related_task']] = true; + $db->query('DELETE FROM {related} WHERE related_id = ?', array($db->fetchOne($existing))); + } +} + +?> diff --git a/setup/upgrade/0.9.9/add_searches.php b/setup/upgrade/0.9.9/add_searches.php new file mode 100644 index 0000000..6e5031c --- /dev/null +++ b/setup/upgrade/0.9.9/add_searches.php @@ -0,0 +1,22 @@ +query('SELECT user_id FROM {users}'); + +while ($row = $db->fetchRow($check_sql)) +{ + $db->query('DELETE FROM {searches} WHERE (name = ? OR name = ? OR name = ?) AND user_id = ?', array('Tasks I watch', 'Tasks assigned to me', 'Tasks I opened', $row['user_id'])); + $db->query('INSERT INTO {searches} (user_id, name, search_string, time) VALUES (?, \'Tasks I watch\', \'a:16:{s:6:"string";N;s:4:"type";a:1:{i:0;s:0:"";}s:3:"sev";a:1:{i:0;s:0:"";}s:3:"due";a:1:{i:0;s:0:"";}s:3:"dev";N;s:3:"cat";a:1:{i:0;s:0:"";}s:6:"status";a:1:{i:0;s:4:"open";}s:5:"order";N;s:4:"sort";N;s:7:"percent";a:1:{i:0;s:0:"";}s:6:"opened";N;s:18:"search_in_comments";N;s:14:"search_for_all";N;s:8:"reported";a:1:{i:0;s:0:"";}s:12:"only_primary";N;s:12:"only_watched";s:1:"1";}\', ' . time() . ')', + array($row['user_id'])); + $db->query('INSERT INTO {searches} (user_id, name, search_string, time) VALUES (?, \'Tasks assigned to me\', \'a:16:{s:6:"string";N;s:4:"type";a:1:{i:0;s:0:"";}s:3:"sev";a:1:{i:0;s:0:"";}s:3:"due";a:1:{i:0;s:0:"";}s:3:"dev";s:' . strlen($row['user_id']) . ':"' . $row['user_id'] .'";s:3:"cat";a:1:{i:0;s:0:"";}s:6:"status";a:1:{i:0;s:4:"open";}s:5:"order";N;s:4:"sort";N;s:7:"percent";a:1:{i:0;s:0:"";}s:6:"opened";N;s:18:"search_in_comments";N;s:14:"search_for_all";N;s:8:"reported";a:1:{i:0;s:0:"";}s:12:"only_primary";N;s:12:"only_watched";N;}\', ' . time() . ')', + array($row['user_id'])); + $db->query('INSERT INTO {searches} (user_id, name, search_string, time) VALUES (?, \'Tasks I opened\', \'a:16:{s:6:"string";N;s:4:"type";a:1:{i:0;s:0:"";}s:3:"sev";a:1:{i:0;s:0:"";}s:3:"due";a:1:{i:0;s:0:"";}s:3:"dev";N;s:3:"cat";a:1:{i:0;s:0:"";}s:6:"status";a:1:{i:0;s:4:"open";}s:5:"order";N;s:4:"sort";N;s:7:"percent";a:1:{i:0;s:0:"";}s:6:"opened";s:' . strlen($row['user_id']) . ':"' . $row['user_id'] .'";s:18:"search_in_comments";N;s:14:"search_for_all";N;s:8:"reported";a:1:{i:0;s:0:"";}s:12:"only_primary";N;s:12:"only_watched";N;}\', ' . time() . ')', + array($row['user_id'])); +} + + +?> + diff --git a/setup/upgrade/0.9.9/clean_unique.php b/setup/upgrade/0.9.9/clean_unique.php new file mode 100644 index 0000000..652630b --- /dev/null +++ b/setup/upgrade/0.9.9/clean_unique.php @@ -0,0 +1,67 @@ +query('SELECT * FROM {users} ORDER BY user_id ASC'); + +while ($row = $db->fetchRow($users)) +{ + if (!isset($deleted[$row['user_name']])) { + $deleted[$row['user_name']] = $row['user_id']; + } + + $db->query('DELETE FROM {users} WHERE user_name = ? AND user_id != ?', + array($row['user_name'], $deleted[$row['user_name']])); +} + + +$users = $db->query('SELECT * FROM {registrations} ORDER BY reg_id ASC'); + +while ($row = $db->fetchRow($users)) +{ + if (!isset($deleted[$row['user_name']])) { + $deleted[$row['user_name']] = $row['reg_id']; + } + + $db->query('DELETE FROM {registrations} WHERE user_name = ? AND reg_id != ?', + array($row['user_name'], $deleted[$row['user_name']])); +} + +// Users in groups + +$sql = $db->query('SELECT * FROM {users_in_groups} ORDER BY record_id'); +while ($row = $db->fetchRow($sql)) +{ + $db->query('DELETE FROM {users_in_groups} WHERE user_id = ? AND group_id = ? AND record_id <> ?', + array($row['user_id'], $row['group_id'], $row['record_id'])); +} + +// Group names + +$sql = $db->query('SELECT * FROM {groups} ORDER BY group_id ASC'); +while ($row = $db->fetchRow($sql)) +{ + $col = 'belongs_to_project'; + if (!isset($row[$col])) { + $col = 'project_id'; + } + + $db->query('DELETE FROM {groups} WHERE group_name = ? AND '.$col.' = ? AND group_id <> ?', + array($row['group_name'], $row[$col], $row['group_id'])); +} + +// Out of range value adjusted for column.. +$sql = $db->query('SELECT * FROM {tasks}'); +while ($row = $db->fetchRow($sql)) +{ + $db->query('UPDATE {tasks} SET date_closed = ?, last_edited_time = ? WHERE task_id = ?', + array(intval($row['date_closed']), intval($row['last_edited_time']), $row['task_id'])); + if (isset($row['due_date'])) { + $db->query('UPDATE {tasks} SET due_date = ? WHERE task_id = ?', + array(intval($row['due_date']), $row['task_id'])); + } +} +?> diff --git a/setup/upgrade/0.9.9/convert_categories.php b/setup/upgrade/0.9.9/convert_categories.php new file mode 100644 index 0000000..99789ad --- /dev/null +++ b/setup/upgrade/0.9.9/convert_categories.php @@ -0,0 +1,43 @@ +query('SELECT category_id FROM {list_category} WHERE parent_id = ? AND project_id = ?', array($parent, $pr)); + + while ($row = $db->fetchRow($result)) { + // recursive execution of this function for each + // child of this node + // $right is the current right value, which is + // incremented by the rebuild_tree function + $right = rebuild_tree($row['category_id'], $right, $pr); + } + + // we've got the left value, and now that we've processed + // the children of this node we also know the right value + $db->query('UPDATE {list_category} SET lft= ?, rgt= ? WHERE category_id = ?', array($left, $right, $parent)); + $sql = $db->query('SELECT * FROM {list_category} WHERE category_id = ? OR project_id=? AND parent_id=-1', array($parent, $pr)); + if (!$db->countRows($sql)) { + $db->query('INSERT INTO {list_category} (project_id, lft, rgt, category_name, parent_id) VALUES(?,?,?,?,-1)', + array($pr,$left,$right,'root')); + } + // return the right value of this node + 1 + return $right+1; +} + +$projects = $db->query('SELECT project_id FROM {projects}'); + +// Global project +rebuild_tree(0, 1, 0); +while ($pr = $db->fetchRow($projects)) { + rebuild_tree(0, 1, $pr['project_id']); +} + +?> diff --git a/setup/upgrade/0.9.9/convert_private.php b/setup/upgrade/0.9.9/convert_private.php new file mode 100644 index 0000000..b871d39 --- /dev/null +++ b/setup/upgrade/0.9.9/convert_private.php @@ -0,0 +1,26 @@ +query('SELECT * FROM {history} WHERE event_type = 26 OR event_type = 27'); + +while ($row = $db->fetchRow($check_sql)) +{ + $db->query('DELETE FROM {history} WHERE history_id = ?', array($row['history_id'])); + if ($row['event_type'] == 26) { + $row['old_value'] = 0; + $row['new_value'] = 1; + } + if ($row['event_type'] == 27) { + $row['old_value'] = 1; + $row['new_value'] = 0; + } + $db->query("INSERT INTO {history} (task_id, user_id, event_date, event_type, field_changed, old_value, new_value) + VALUES(?, ?, ?, 0, 'mark_private', ?, ?)", + array($row['task_id'], $row['user_id'], $row['event_date'], $row['old_value'], $row['new_value'])); +} + + +?> diff --git a/setup/upgrade/0.9.9/flyspray-begin.xml b/setup/upgrade/0.9.9/flyspray-begin.xml new file mode 100644 index 0000000..aac979a --- /dev/null +++ b/setup/upgrade/0.9.9/flyspray-begin.xml @@ -0,0 +1,748 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+
diff --git a/setup/upgrade/0.9.9/flyspray-final.xml b/setup/upgrade/0.9.9/flyspray-final.xml new file mode 100644 index 0000000..5db6a96 --- /dev/null +++ b/setup/upgrade/0.9.9/flyspray-final.xml @@ -0,0 +1,976 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + + + task_id + user_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_tense + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+ + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + + + + + + + + + + + + + + + + +
+
diff --git a/setup/upgrade/0.9.9/flyspray-install.xml b/setup/upgrade/0.9.9/flyspray-install.xml new file mode 100644 index 0000000..7496241 --- /dev/null +++ b/setup/upgrade/0.9.9/flyspray-install.xml @@ -0,0 +1,1044 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + + + task_id + user_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_tense + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + task_id + user_id + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_name + +
+ + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + + + + + + + + + + + + + + + + +
+ + INSERT INTO groups VALUES (DEFAULT, 'Admin', 'Members have unlimited access to all functionality.', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Developers', 'Global Developers for all projects', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Reporters', 'Open new tasks / add comments in all projects', 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Basic', 'Members can login, relying upon Project permissions only', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1); + INSERT INTO groups VALUES (DEFAULT, 'Pending', 'Users who are awaiting approval of their accounts.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + INSERT INTO groups VALUES (DEFAULT, 'Project Managers', 'Permission to do anything related to the Default Project.', 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1); + INSERT INTO history VALUES (DEFAULT, 1, 1, 1130024797, 1, '', '', ''); + INSERT INTO list_category VALUES (DEFAULT, 1, 'Backend / Core', 1, 0, 2, 3); + INSERT INTO list_category VALUES (DEFAULT, 0, 'root', 0, 0, 1, 2); + INSERT INTO list_category VALUES (DEFAULT, 1, 'root', 0, 0, 1, 4); + INSERT INTO list_os VALUES (DEFAULT, 1, 'All', 1, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Windows', 2, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Linux', 3, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Mac OS', 4, 1); + INSERT INTO list_resolution VALUES (DEFAULT, 'Not a bug', 1, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t fix', 2, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t implement', 3, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Works for me', 4, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Deferred', 5, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Duplicate', 6, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Fixed', 7, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Implemented', 8, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Bug Report', 1, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Feature Request', 2, 1, 0); + INSERT INTO list_version VALUES (DEFAULT, 1, 'Development', 1, 1, 2); + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0) + INSERT INTO prefs VALUES (DEFAULT, 'fs_ver', '0.9.9'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_port', '5222'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_username', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_password', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_group', '4'); + INSERT INTO prefs VALUES (DEFAULT, 'user_notify', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'admin_email', 'flyspray@example.com'); + INSERT INTO prefs VALUES (DEFAULT, 'lang_code', 'en'); + INSERT INTO prefs VALUES (DEFAULT, 'spam_proof', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_project', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat', ''); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat_extended', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_reg', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'global_theme', 'CleanFS'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_columns', 'id project category tasktype severity summary status progress'); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_user', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_pass', ''); + INSERT INTO prefs VALUES (DEFAULT, 'page_title', 'Flyspray::'); + INSERT INTO prefs VALUES (DEFAULT, 'notify_registration', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_ssl', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'last_update_check', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'cache_feeds', '1'); + INSERT INTO projects VALUES (DEFAULT, 'Default Project', 'CleanFS', 0, 'Welcome to your first Flyspray project! We hope that Flyspray provides you with many hours of increased productivity. If you have any issues, go to http://flyspray.org/support. You can customise this message by clicking the **Manage Project** link in the menu above...', 1, 'id category tasktype severity summary status progress', 1, 0, '', '', NULL, '0', NULL, NULL, '', 'en', 0, 0, 0, NULL, 'index'); + INSERT INTO tasks VALUES (1, 1, 1, 1130024797, 1, 0, 0, 0, ' ', 'Sample Task', 'This isn''t a real task. You should close it and start opening some real tasks.', 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, '', '0'); + INSERT INTO users VALUES (DEFAULT, 'super', '1b3231655cebb7a1f783eddf27d254ca', 'Mr Super User', 'super@example.com', 'super@example.com', 0, 1, 1, '', '', 25, 0, 0, 0); + INSERT INTO users_in_groups VALUES (DEFAULT, 1, 1); + +
diff --git a/setup/upgrade/0.9.9/rename_columns.php b/setup/upgrade/0.9.9/rename_columns.php new file mode 100644 index 0000000..07a949a --- /dev/null +++ b/setup/upgrade/0.9.9/rename_columns.php @@ -0,0 +1,14 @@ +dblink); + +$sqlarray = $dict->RenameColumnSQL($conf['database']['dbprefix'] . 'tasks', 'attached_to_project', 'project_id', 'TYPE INT(3) NOTNULL DEFAULT 0'); +$dict->ExecuteSQLArray($sqlarray); + +$sqlarray = $dict->RenameColumnSQL($conf['database']['dbprefix'] . 'groups', 'belongs_to_project', 'project_id', ' TYPE INT(3) NOTNULL DEFAULT 0'); +$dict->ExecuteSQLArray($sqlarray); + +?> \ No newline at end of file diff --git a/setup/upgrade/0.9.9/upgrade.info b/setup/upgrade/0.9.9/upgrade.info new file mode 100644 index 0000000..e5ea7e5 --- /dev/null +++ b/setup/upgrade/0.9.9/upgrade.info @@ -0,0 +1,44 @@ +[defaultupgrade] +0="clean_unique.php" +1="flyspray-begin.xml" +2="upgrade_assignments.php" +3="convert_categories.php" +4="convert_private.php" +5="add_duplicates.php" +6="add_searches.php" +7="rename_columns.php" +8="flyspray-final.xml" +9="add_data.php" + +[develupgrade] +1="flyspray-final.xml" + +[options] + +1="
" + +[fsprefs] +fs_ver="0.9.7" ; doesn't matter which version +jabber_server="" +jabber_port="5222" +jabber_username="" +jabber_password="" +anon_group="0" +user_notify="1" +admin_email="flyspray@example.com" +lang_code="en" +spam_proof="1" +default_project="1" +dateformat="" +dateformat_extended="" +anon_reg="1" +page_title="Flyspray:: " +notify_registration="0" +jabber_ssl="0" +last_update_check="0" +cache_feeds="1" +global_theme="CleanFS" +visible_columns="id project tasktype severity summary status progress" +smtp_server="" +smtp_user="" +smtp_pass="" \ No newline at end of file diff --git a/setup/upgrade/0.9.9/upgrade_assignments.php b/setup/upgrade/0.9.9/upgrade_assignments.php new file mode 100644 index 0000000..a9aa53c --- /dev/null +++ b/setup/upgrade/0.9.9/upgrade_assignments.php @@ -0,0 +1,31 @@ +query("SELECT task_id, assigned_to + FROM {tasks} + WHERE assigned_to > '0'"); + +while ($row = $db->fetchRow($check_sql)) +{ + $check = $db->query('SELECT assigned_id FROM {assigned} WHERE task_id = ? AND user_id = ?', + array($row['task_id'], $row['assigned_to'])); + if ($db->fetchOne($check)) { + continue; + } + + $db->query('INSERT INTO {assigned} + (task_id, user_id) + VALUES (?,?)', + array($row['task_id'], $row['assigned_to'])); + + $db->query('UPDATE {tasks} + SET assigned_to = 0 + WHERE task_id = ?', + array($row['task_id'])); +} +?> diff --git a/setup/upgrade/1.0/datadict-postgres.inc.php b/setup/upgrade/1.0/datadict-postgres.inc.php new file mode 100644 index 0000000..ebcb001 --- /dev/null +++ b/setup/upgrade/1.0/datadict-postgres.inc.php @@ -0,0 +1,606 @@ +type; + $len = $fieldobj->max_length; + } + $is_serial = is_object($fieldobj) && !empty($fieldobj->primary_key) && !empty($fieldobj->unique) && + !empty($fieldobj->has_default) && substr($fieldobj->default_value,0,8) == 'nextval('; + + switch (strtoupper($t)) { + case 'INTERVAL': + case 'CHAR': + case 'CHARACTER': + case 'VARCHAR': + case 'NAME': + case 'BPCHAR': + if ($len <= $this->blobSize) return 'C'; + + case 'TEXT': + return 'X'; + + case 'IMAGE': // user defined type + case 'BLOB': // user defined type + case 'BIT': // This is a bit string, not a single bit, so don't return 'L' + case 'VARBIT': + case 'BYTEA': + return 'B'; + + case 'BOOL': + case 'BOOLEAN': + return 'L'; + + case 'DATE': + return 'D'; + + case 'TIME': + case 'DATETIME': + case 'TIMESTAMP': + case 'TIMESTAMPTZ': + return 'T'; + + case 'INTEGER': return !$is_serial ? 'I' : 'R'; + case 'SMALLINT': + case 'INT2': return !$is_serial ? 'I2' : 'R'; + case 'INT4': return !$is_serial ? 'I4' : 'R'; + case 'BIGINT': + case 'INT8': return !$is_serial ? 'I8' : 'R'; + + case 'OID': + case 'SERIAL': + return 'R'; + + case 'FLOAT4': + case 'FLOAT8': + case 'DOUBLE PRECISION': + case 'REAL': + return 'F'; + + default: + return 'N'; + } + } + + function actualType($meta) + { + switch($meta) { + case 'C': return 'VARCHAR'; + case 'XL': + case 'X': return 'TEXT'; + + case 'C2': return 'VARCHAR'; + case 'X2': return 'TEXT'; + + case 'B': return 'BYTEA'; + + case 'D': return 'DATE'; + case 'TS': + case 'T': return 'TIMESTAMP'; + + case 'L': return 'BOOLEAN'; + case 'I': return 'INTEGER'; + case 'I1': return 'SMALLINT'; + case 'I2': return 'INT2'; + case 'I4': return 'INT4'; + case 'I8': return 'INT8'; + + case 'F': return 'FLOAT8'; + case 'N': return 'NUMERIC'; + default: + return $meta; + } + } + + /** + * Adding a new Column + * + * reimplementation of the default function as postgres does NOT allow to set the default in the same statement + * + * @param string $tabname table-name + * @param string $flds column-names and types for the changed columns + * @return array with SQL strings + */ + function addColumnSQL($tabname, $flds) + { + $tabname = $this->tableName($tabname); + $sql = array(); + $not_null = false; + list($lines,$pkey) = $this->_genFields($flds); + $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; + foreach($lines as $v) { + if (($not_null = preg_match('/NOT NULL/i',$v))) { + $v = preg_replace('/NOT NULL/i','',$v); + } + + if (preg_match('/^([^ ]+) .*DEFAULT (\'[^\']+\'|\"[^\"]+\"|[^ ]+)/',$v,$matches)) { + list(,$colname,$default) = $matches; + $sql[] = $alter . str_replace('DEFAULT '.$default,'',$v); + $sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default; + $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default; + } + // SERIAL is not a true type in PostgreSQL and is only allowed when creating a new table. + // See http://www.postgresql.org/docs/9.4/static/datatype-numeric.html, 8.1.4. Serial Types. + elseif (preg_match('/^([^ ]+) .*SERIAL/i',$v,$matches)) { + list(,$colname,$default) = $matches; + $sql[] = 'CREATE SEQUENCE '.$tabname.'_'.$colname.'_seq'; + $sql[] = $alter.$colname.' INTEGER'; + $sql[] = 'ALTER SEQUENCE '.$tabname.'_'.$colname.'_seq OWNED BY '.$tabname.'.'.$colname; + $sql[] = 'UPDATE '.$tabname.' SET '.$colname.' = nextval(\''.$tabname.'_'.$colname.'_seq\')'; + $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT nextval(\''.$tabname.'_'.$colname.'_seq\')'; + $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL'; + $not_null = false; + } else { + $sql[] = $alter . $v; + } + if ($not_null) { + list($colname) = explode(' ',$v); + $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL'; + } + } + return $sql; + } + + + function dropIndexSQL ($idxname, $tabname = NULL) + { + return array(sprintf($this->dropIndex, $this->tableName($idxname), $this->tableName($tabname))); + } + + /** + * Change the definition of one column + * + * Postgres can't do that on it's own, you need to supply the complete defintion of the new table, + * to allow, recreating the table and copying the content over to the new table + * @param string $tabname table-name + * @param string $flds column-name and type for the changed column + * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' + * @param array/ $tableoptions options for the new table see createTableSQL, default '' + * @return array with SQL strings + */ + /* + function alterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + { + if (!$tableflds) { + if ($this->debug) ADOConnection::outp("alterColumnSQL needs a complete table-definiton for PostgreSQL"); + return array(); + } + return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions); + }*/ + + function alterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + { + // Check if alter single column datatype available - works with 8.0+ + $has_alter_column = 8.0 <= (float) @$this->serverInfo['version']; + + if ($has_alter_column) { + $tabname = $this->tableName($tabname); + $sql = array(); + list($lines,$pkey) = $this->_genFields($flds); + $set_null = false; + foreach($lines as $v) { + $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' '; + if ($not_null = preg_match('/NOT NULL/i',$v)) { + $v = preg_replace('/NOT NULL/i','',$v); + } + + // SERIAL is not a true type in PostgreSQL and is only allowed when creating a new table. + // See http://www.postgresql.org/docs/9.4/static/datatype-numeric.html, 8.1.4. Serial Types. + if (preg_match('/SERIAL/i',$v)) { + continue; + } + // this next block doesn't work - there is no way that I can see to + // explicitly ask a column to be null using $flds + else if ($set_null = preg_match('/NULL/i',$v)) { + // if they didn't specify not null, see if they explicitely asked for null + // Lookbehind pattern covers the case 'fieldname NULL datatype DEFAULT NULL' + // only the first NULL should be removed, not the one specifying + // the default value + $v = preg_replace('/(?metaColumns($tabname); + list(,$colname,$default) = $matches; + $alter .= $colname; + if ($this->connection) { + $old_coltype = $this->connection->metaType($existing[strtoupper($colname)]); + } + else { + $old_coltype = $t; + } + $v = preg_replace('/^' . preg_quote($colname) . '\s/', '', $v); + $t = trim(str_replace('DEFAULT '.$default,'',$v)); + + // Type change from bool to int + if ( $old_coltype == 'L' && $t == 'INTEGER' ) { + $sql[] = $alter . ' DROP DEFAULT'; + $sql[] = $alter . " TYPE $t USING ($colname::BOOL)::INT"; + $sql[] = $alter . " SET DEFAULT $default"; + } + // Type change from int to bool + else if ( $old_coltype == 'I' && $t == 'BOOLEAN' ) { + if( strcasecmp('NULL', trim($default)) != 0 ) { + $default = $this->connection->qstr($default); + } + $sql[] = $alter . ' DROP DEFAULT'; + $sql[] = $alter . " TYPE $t USING CASE WHEN $colname = 0 THEN false ELSE true END"; + $sql[] = $alter . " SET DEFAULT $default"; + } + // Any other column types conversion + else { + $sql[] = $alter . " TYPE $t"; + $sql[] = $alter . " SET DEFAULT $default"; + } + + } + else { + // drop default? + preg_match ('/^\s*(\S+)\s+(.*)$/',$v,$matches); + list (,$colname,$rest) = $matches; + $alter .= $colname; + $sql[] = $alter . ' TYPE ' . $rest; + } + +# list($colname) = explode(' ',$v); + if ($not_null) { + // this does not error out if the column is already not null + $sql[] = $alter . ' SET NOT NULL'; + } + if ($set_null) { + // this does not error out if the column is already null + $sql[] = $alter . ' DROP NOT NULL'; + } + } + return $sql; + } + + // does not have alter column + if (!$tableflds) { + if ($this->debug) ADOConnection::outp("AlterColumnSQL needs a complete table-definiton for PostgreSQL"); + return array(); + } + return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions); + } + + /** + * Drop one column + * + * Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table, + * to allow, recreating the table and copying the content over to the new table + * @param string $tabname table-name + * @param string $flds column-name and type for the changed column + * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' + * @param array/ $tableoptions options for the new table see CreateTableSQL, default '' + * @return array with SQL strings + */ + function dropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + { + $has_drop_column = 7.3 <= (float) @$this->serverInfo['version']; + if (!$has_drop_column && !$tableflds) { + if ($this->debug) ADOConnection::outp("DropColumnSQL needs complete table-definiton for PostgreSQL < 7.3"); + return array(); + } + if ($has_drop_column) { + return ADODB_DataDict::dropColumnSQL($tabname, $flds); + } + return $this->_recreate_copy_table($tabname,$flds,$tableflds,$tableoptions); + } + + /** + * Save the content into a temp. table, drop and recreate the original table and copy the content back in + * + * We also take care to set the values of the sequenz and recreate the indexes. + * All this is done in a transaction, to not loose the content of the table, if something went wrong! + * @internal + * @param string $tabname table-name + * @param string $dropflds column-names to drop + * @param string $tableflds complete defintion of the new table, eg. for postgres + * @param array/string $tableoptions options for the new table see CreateTableSQL, default '' + * @return array with SQL strings + */ + function _recreate_copy_table($tabname,$dropflds,$tableflds,$tableoptions='') + { + if ($dropflds && !is_array($dropflds)) $dropflds = explode(',',$dropflds); + $copyflds = array(); + foreach($this->metaColumns($tabname) as $fld) { + if (!$dropflds || !in_array($fld->name,$dropflds)) { + // we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one + if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && + in_array($fld->type,array('varchar','char','text','bytea'))) { + $copyflds[] = "to_number($fld->name,'S9999999999999D99')"; + } else { + $copyflds[] = $fld->name; + } + // identify the sequence name and the fld its on + if ($fld->primary_key && $fld->has_default && + preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) { + $seq_name = $matches[1]; + $seq_fld = $fld->name; + } + } + } + $copyflds = implode(', ',$copyflds); + + $tempname = $tabname.'_tmp'; + $aSql[] = 'BEGIN'; // we use a transaction, to make sure not to loose the content of the table + $aSql[] = "SELECT * INTO TEMPORARY TABLE $tempname FROM $tabname"; + $aSql = array_merge($aSql,$this->dropTableSQL($tabname)); + $aSql = array_merge($aSql,$this->createTableSQL($tabname,$tableflds,$tableoptions)); + $aSql[] = "INSERT INTO $tabname SELECT $copyflds FROM $tempname"; + if ($seq_name && $seq_fld) { // if we have a sequence we need to set it again + $seq_name = $tabname.'_'.$seq_fld.'_seq'; // has to be the name of the new implicit sequence + $aSql[] = "SELECT setval('$seq_name',MAX($seq_fld)) FROM $tabname"; + } + $aSql[] = "DROP TABLE $tempname"; + // recreate the indexes, if they not contain one of the droped columns + foreach($this->metaIndexes($tabname) as $idx_name => $idx_data) + { + if (substr($idx_name,-5) != '_pkey' && (!$dropflds || !count(array_intersect($dropflds,$idx_data['columns'])))) { + $aSql = array_merge($aSql,$this->createIndexSQL($idx_name,$tabname,$idx_data['columns'], + $idx_data['unique'] ? array('UNIQUE') : False)); + } + } + $aSql[] = 'COMMIT'; + return $aSql; + } + + function dropTableSQL($tabname) + { + $sql = ADODB_DataDict::dropTableSQL($tabname); + + $drop_seq = $this->_dropAutoIncrement($tabname); + if ($drop_seq) $sql[] = $drop_seq; + + return $sql; + } + + // return string must begin with space + function _createSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) + { + if ($fautoinc) { + $ftype = 'SERIAL'; + return ''; + } + $suffix = ''; + if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; + if ($fnotnull) $suffix .= ' NOT NULL'; + if ($fconstraint) $suffix .= ' '.$fconstraint; + return $suffix; + } + + // search for a sequece for the given table (asumes the seqence-name contains the table-name!) + // if yes return sql to drop it + // this is still necessary if postgres < 7.3 or the SERIAL was created on an earlier version!!! + function _dropAutoIncrement($tabname) + { + $tabname = $this->connection->quote('%'.$tabname.'%'); + + $seq = $this->connection->getOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'"); + + // check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly + if (!$seq || $this->connection->getOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) { + return False; + } + return "DROP SEQUENCE ".$seq; + } + + function renameTableSQL($tabname,$newname) + { + if (!empty($this->schema)) { + $rename_from = $this->tableName($tabname); + $schema_save = $this->schema; + $this->schema = false; + $rename_to = $this->tableName($newname); + $this->schema = $schema_save; + return array (sprintf($this->renameTable, $rename_from, $rename_to)); + } + + return array (sprintf($this->renameTable, $this->tableName($tabname),$this->tableName($newname))); + } + + /* + CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( + { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] + | table_constraint } [, ... ] + ) + [ INHERITS ( parent_table [, ... ] ) ] + [ WITH OIDS | WITHOUT OIDS ] + where column_constraint is: + [ CONSTRAINT constraint_name ] + { NOT NULL | NULL | UNIQUE | PRIMARY KEY | + CHECK (expression) | + REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ] + [ ON DELETE action ] [ ON UPDATE action ] } + [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] + and table_constraint is: + [ CONSTRAINT constraint_name ] + { UNIQUE ( column_name [, ... ] ) | + PRIMARY KEY ( column_name [, ... ] ) | + CHECK ( expression ) | + FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] + [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } + [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] + */ + + + /* + CREATE [ UNIQUE ] INDEX index_name ON table +[ USING acc_method ] ( column [ ops_name ] [, ...] ) +[ WHERE predicate ] +CREATE [ UNIQUE ] INDEX index_name ON table +[ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] ) +[ WHERE predicate ] + */ + function _indexSQL($idxname, $tabname, $flds, $idxoptions) + { + $sql = array(); + + if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { + $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); + if ( isset($idxoptions['DROP']) ) + return $sql; + } + + if ( empty ($flds) ) { + return $sql; + } + + $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; + + $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' '; + + if (isset($idxoptions['HASH'])) + $s .= 'USING HASH '; + + if ( isset($idxoptions[$this->upperName]) ) + $s .= $idxoptions[$this->upperName]; + + if ( is_array($flds) ) + $flds = implode(', ',$flds); + $s .= '(' . $flds . ')'; + $sql[] = $s; + + return $sql; + } + + function _getSize($ftype, $ty, $fsize, $fprec) + { + if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty != 'I' && strpos($ftype,'(') === false) { + $ftype .= "(".$fsize; + if (strlen($fprec)) $ftype .= ",".$fprec; + $ftype .= ')'; + } + return $ftype; + } + + /** + "Florian Buzin [ easywe ]" + + This function changes/adds new fields to your table. You don't + have to know if the col is new or not. It will check on its own. + */ + function changeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=false) + { + global $ADODB_FETCH_MODE; + + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; + if ($this->connection->fetchMode !== false) $savem = $this->connection->setFetchMode(false); + + // check table exists + $save_handler = $this->connection->raiseErrorFn; + $this->connection->raiseErrorFn = ''; + $cols = $this->metaColumns($tablename); + $this->connection->raiseErrorFn = $save_handler; + + if (isset($savem)) $this->connection->setFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + if ( empty($cols)) { + return $this->createTableSQL($tablename, $flds, $tableoptions); + } + + $addedcols = array(); + $modifiedcols = array(); + + if (is_array($flds)) { + // Cycle through the update fields, comparing + // existing fields to fields to update. + // if the Metatype and size is exactly the + // same, ignore - by Mark Newham + foreach($flds as $k=>$v) { + if ( isset($cols[$k]) && is_object($cols[$k]) ) { + // If already not allowing nulls, then don't change + $obj = $cols[$k]; + if (isset($obj->not_null) && $obj->not_null) + $v = str_replace('NOT NULL','',$v); + if (isset($obj->auto_increment) && $obj->auto_increment && empty($v['AUTOINCREMENT'])) + $v = str_replace('AUTOINCREMENT','',$v); + + $c = $cols[$k]; + $ml = $c->max_length; + $mt = $this->metaType($c->type,$ml); + + if (isset($c->scale)) $sc = $c->scale; + else $sc = 99; // always force change if scale not known. + + if ($sc == -1) $sc = false; + list($fsize, $fprec) = $this->_getSizePrec($v['SIZE']); + + if ($ml == -1) $ml = ''; + if ($mt == 'X') $ml = $v['SIZE']; + if (($mt != $v['TYPE']) || ($ml != $fsize || $sc != $fprec) || (isset($v['AUTOINCREMENT']) && $v['AUTOINCREMENT'] != $obj->auto_increment)) { + $modifiedcols[$k] = $v; + } + } else { + $addedcols[$k] = $v; + } + } + } + + + $sql = array(); + $sql = $this->addColumnSQL($tablename, $addedcols); + + // already exists, alter table instead + list($lines,$pkey,$idxs) = $this->_genFields($modifiedcols); + // genfields can return FALSE at times + if ($lines == null) $lines = array(); + + $holdflds = array(); + foreach ( $lines as $id => $v ) { + if ( isset($cols[$id]) && is_object($cols[$id]) ) { + + $flds = lens_ParseArgs($v,','); + + // We are trying to change the size of the field, if not allowed, simply ignore the request. + // $flds[1] holds the type, $flds[2] holds the size -postnuke addition + if ($flds && in_array(strtoupper(substr($flds[0][1],0,4)),$this->invalidResizeTypes4) + && (isset($flds[0][2]) && is_numeric($flds[0][2]))) { + if ($this->debug) ADOConnection::outp(sprintf("

%s cannot be changed to %s currently

", $flds[0][0], $flds[0][1])); + #echo "

$this->alterCol cannot be changed to $flds currently

"; + continue; + } + $holdflds[] = $modifiedcols[$id]; + } + } + $modifiedcols = $holdflds; + $sql += $this->alterColumnSQL($tablename, $modifiedcols); + + if ($dropOldFlds) { + $alter = 'ALTER TABLE ' . $this->tableName($tablename); + foreach ( $cols as $id => $v ) + if ( !isset($lines[$id]) ) + $sql[] = $alter . $this->dropCol . ' ' . $v->name; + } + return $sql; + } +} diff --git a/setup/upgrade/1.0/flyspray-install.xml b/setup/upgrade/1.0/flyspray-install.xml new file mode 100644 index 0000000..ee7102b --- /dev/null +++ b/setup/upgrade/1.0/flyspray-install.xml @@ -0,0 +1,1373 @@ + + + + multiple addresses for users. subject to change in FS1.1+! + + + + + + + + + + +
+ + Do not use this table. pre FS1.0-beta table + + +
+ + Pending requests for admins and PMs to attend to + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + resolved_by + project_id + +
+ + Who is assigned what task + + + + + + + + + + + + + + + task_id + user_id + +
+ + List the names and locations of files attached to tasks + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + Table to cache RSS/Atom feeds + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+ + task comments + + + + + + + + + + + + + + + + + + + + + + + + + task_id + + + user_id + +
+ + Task inter-dependencies + + + + + + + + + + + + + + + task_id + dep_task_id + +
+ + log of time spent on tasks + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + User Groups for the Flyspray bug killer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + log of Flyspray activities + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + + + event_date + + + event_type + +
+ + hierarchic task categories + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + Operating system list for the Flyspray bug killer + + + + + + + + + + + + + + + + + + + + + + project_id + os_name + +
+ + task close reasons + + + + + + + + + + + + + + + + + + + + + + project_id + resolution_name + +
+ + List of possible task statuses + + + + + + + + + + + + + + + + + + + + + + project_id + status_name + +
+ + definition of tags/labels for tasks + + + + + + + + + + + + + + + + + + + + + + + project_id + tag_name + +
+ + List of possible task types + + + + + + + + + + + + + + + + + + + + + + project_id + tasktype_name + +
+ + list of project versions/milestones/software release versions + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_name + + + project_id + version_tense + +
+ + Notification body and subject + + + + + + + + + + + + + + +
+ + Notification recipient list + + + + + + + + + + + + + + +
+ + Extra task notification registrations are stored here + + + + + + + + + + + + + + + task_id + user_id + +
+ + global settings of Flyspray + + + + + + + + +
+ + project settings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + +
+ + table for yet unconfirmed user registrations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + contains loose task relations to another task or task duplicates + + + + + + + + + + + + + + + + + + + this_task + related_task + is_duplicate + +
+ + scheduled task reminders + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Saves custom searches of users + + + + + + + + + + + + + + + + + + +
+ + main table for storing tasks + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + + + project_id + supertask_id + + + supertask_id + task_id + project_id + +
+ + join table to add tags/labels to tasks + + + + + + + + + task_id + tag_id + +
+ + user accounts of Flyspray + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + last login of a user + + + + + user_name + +
+ + Which users are in which groups + + + + + + + + + + + + + + + group_id + user_id + + + user_id + +
+ + votes for tasks + + + + + + + + + + + + + + + + + + task_id + +
+ + link a resource (e.g. an URL) with a task - in a more structured way than the task description text area. + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + INSERT INTO groups VALUES (DEFAULT, 'Admin', 'Members have unlimited access to all functionality', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Developers', 'Global Developers for all projects', 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Reporters', 'Open new tasks / add comments in all projects', 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Basic', 'Members can login, relying upon Project permissions only', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1); + INSERT INTO groups VALUES (DEFAULT, 'Pending', 'Users who are awaiting approval of their accounts', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + INSERT INTO groups VALUES (DEFAULT, 'Project Managers', 'Permission to do anything related to the Default Project', 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + INSERT INTO history VALUES (DEFAULT, 1, 1, 1130024797, 1, '', '', ''); + INSERT INTO list_category VALUES (DEFAULT, 1, 'Backend / Core', 1, 0, 2, 3); + INSERT INTO list_category VALUES (DEFAULT, 0, 'root', 0, 0, 1, 2); + INSERT INTO list_category VALUES (DEFAULT, 1, 'root', 0, 0, 1, 4); + INSERT INTO list_os VALUES (DEFAULT, 1, 'All', 1, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Windows', 2, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Linux', 3, 1); + INSERT INTO list_os VALUES (DEFAULT, 1, 'Mac OS', 4, 1); + INSERT INTO list_resolution VALUES (DEFAULT, 'Not a bug', 1, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t fix', 2, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Won''t implement', 3, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Works for me', 4, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Deferred', 5, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Duplicate', 6, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Fixed', 7, 1, 0); + INSERT INTO list_resolution VALUES (DEFAULT, 'Implemented', 8, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Bug Report', 1, 1, 0); + INSERT INTO list_tasktype VALUES (DEFAULT, 'Feature Request', 2, 1, 0); + INSERT INTO list_version VALUES (DEFAULT, 1, 'Development', 1, 1, 2); + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Unconfirmed', 1, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('New', 2, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Assigned', 3, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Researching', 4, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Waiting on Customer', 5, 1, 0) + INSERT INTO list_status (status_name, list_position, show_in_list, project_id) VALUES ('Requires testing', 6, 1, 0) + INSERT INTO prefs VALUES (DEFAULT, 'fs_ver', '1.0'); + INSERT INTO prefs VALUES (DEFAULT, 'logo', 'flyspray_small.png'); + INSERT INTO prefs VALUES (DEFAULT, 'gravatars', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'emailNoHTML', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_port', '5222'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_username', ''); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_password', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_group', '4'); + INSERT INTO prefs VALUES (DEFAULT, 'user_notify', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'admin_email', 'flyspray@example.com'); + INSERT INTO prefs VALUES (DEFAULT, 'lang_code', 'en'); + INSERT INTO prefs VALUES (DEFAULT, 'need_approval', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'spam_proof', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_project', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'default_entry', 'index'); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat', ''); + INSERT INTO prefs VALUES (DEFAULT, 'dateformat_extended', ''); + INSERT INTO prefs VALUES (DEFAULT, 'anon_reg', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'global_theme', 'CleanFS'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_columns', 'id category tasktype priority severity summary status progress'); + INSERT INTO prefs VALUES (DEFAULT, 'visible_fields', 'tasktype category severity priority status private assignedto reportedin dueversion duedate progress os votes'); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_server', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_user', ''); + INSERT INTO prefs VALUES (DEFAULT, 'smtp_pass', ''); + INSERT INTO prefs VALUES (DEFAULT, 'page_title', 'Flyspray::'); + INSERT INTO prefs VALUES (DEFAULT, 'notify_registration', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'jabber_ssl', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'last_update_check', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'intro_message', ''); + INSERT INTO prefs VALUES (DEFAULT, 'cache_feeds', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'disable_lostpw', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'disable_changepw', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'days_before_alert', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'hide_emails', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'pages_welcome_msg', 'index'); + INSERT INTO prefs VALUES (DEFAULT, 'active_oauths', ''); + INSERT INTO prefs VALUES (DEFAULT, 'only_oauth_reg', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'enable_avatars', '1'); + INSERT INTO prefs VALUES (DEFAULT, 'max_avatar_size', '50'); + INSERT INTO prefs VALUES (DEFAULT, 'default_order_by', 'id'); + INSERT INTO prefs VALUES (DEFAULT, 'default_order_by_dir', 'desc'); + INSERT INTO prefs VALUES (DEFAULT, 'url_rewriting', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'max_vote_per_day', '2'); + INSERT INTO prefs VALUES (DEFAULT, 'votes_per_project', '10'); + INSERT INTO prefs VALUES (DEFAULT, 'custom_style', ''); + INSERT INTO prefs VALUES (DEFAULT, 'general_integration', ''); + INSERT INTO prefs VALUES (DEFAULT, 'footer_integration', ''); + INSERT INTO prefs VALUES (DEFAULT, 'repeat_password', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'repeat_emailaddress', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'massops', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'captcha_securimage', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'captcha_recaptcha', '0'); + INSERT INTO prefs VALUES (DEFAULT, 'captcha_recaptcha_sitekey', ''); + INSERT INTO prefs VALUES (DEFAULT, 'captcha_recaptcha_secret', ''); + INSERT INTO projects VALUES (DEFAULT, 'Default Project', 'CleanFS', 0, 'Welcome to your first Flyspray project! We hope that Flyspray provides you with many hours of increased productivity. If you have any issues, go to http://flyspray.org . You can customise this message [[?do=pm&project=1|here]]', 1, 'id category tasktype priority severity summary status progress', 'tasktype category severity priority status private assignedto reportedin dueversion duedate progress os votes', 1, 1, 0, '', '', NULL, '0', NULL, NULL, '', 'en', 0, 0, 0, NULL, 'index', 0, 0,'Undecided', '', 0, 0, 0, 'id desc', 'DESC', '', 1 ); + INSERT INTO tasks VALUES (DEFAULT, 1, 1, 1452600000, 1, 0, 0, 0, ' ', 'Sample Task', 'This isn''t a real task. You should close it and start opening some real tasks.', 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, '', '0', 0, 0, 0); + INSERT INTO users VALUES (DEFAULT, 'super', '1b3231655cebb7a1f783eddf27d254ca', 'Superuser', '', '', 0, 1, 1, '', '', '', 25, 0, 0, 0, 0, 'en', '0', '', '', 0, 0, NULL); + INSERT INTO users_in_groups VALUES (DEFAULT, 1, 1); + +
diff --git a/setup/upgrade/1.0/upgrade.info b/setup/upgrade/1.0/upgrade.info new file mode 100644 index 0000000..a1510a5 --- /dev/null +++ b/setup/upgrade/1.0/upgrade.info @@ -0,0 +1,70 @@ +[defaultupgrade] +1="upgrade.xml" +2="varchartotext.php" + +[develupgrade] +1="upgrade.xml" +2="varchartotext.php" + +[fsprefs] +fs_ver="1.0" +logo="flyspray_small.png" +jabber_server="" +jabber_port="5222" +jabber_username="" +jabber_password="" +anon_group="0" +user_notify="1" +admin_email="flyspray@example.com" +lang_code="en" +need_approval="0" +spam_proof="1" +default_project="1" +default_entry="index" +dateformat="" +dateformat_extended="" +anon_reg="1" +page_title="Flyspray:: " +notify_registration="0" +jabber_ssl="0" +last_update_check="0" +cache_feeds="1" +global_theme="CleanFS" +visible_columns="id supertask project tasktype severity summary status progress" +visible_fields="supertask tasktype category severity priority status private assignedto reportedin dueversion duedate progress os votes" +smtp_server="" +smtp_user="" +smtp_pass="" +lock_for="5" +email_ssl="0" +email_tls="0" +gravatars="0" +emailNoHTML="0" +default_timezone="0" +intro_message="" +disable_lostpw="0" +disable_changepw="0" +days_before_alert="0" +hide_emails="1" +pages_welcome_msg="index" +active_oauths="" +only_oauth_reg="0" +enable_avatars="1" +max_avatar_size="50" +default_order_by="id" +default_order_by_dir="desc" +url_rewriting="0" +max_vote_per_day="2" +votes_per_project="10" +custom_style="" +general_integration="" +footer_integration="" +repeat_password="0" +repeat_emailaddress="0" +massops="0" +; Would like to see captchastuff be optional prefs, but +; current upgrade logic wipes such additional prefs if not listed here too. +captcha_securimage="0" +captcha_recaptcha="0" +captcha_recaptcha_sitekey="" +captcha_recaptcha_secret="" diff --git a/setup/upgrade/1.0/upgrade.xml b/setup/upgrade/1.0/upgrade.xml new file mode 100644 index 0000000..0a48596 --- /dev/null +++ b/setup/upgrade/1.0/upgrade.xml @@ -0,0 +1,902 @@ + + + + List the names and locations of files attached to tasks + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + task_id + comment_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + topic + project_id + max_items + + + type + topic + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + last login of a user + + + + + user_name + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group_name + project_id + + + project_id + +
+ + global settings of Flyspray + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + + + task_severity + + + task_type + + + product_category + + + item_status + + + is_closed + + + closedby_version + + + due_date + + + project_id + supertask_id + list_order + + + supertask_id + list_order + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + task_id + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + +
+ + + + + + + + + + + + + + + + + + + + + + + project_id + os_name + +
+ + + + + + + + + + + + + + + + + + + + + + + project_id + resolution_name + +
+ + + + + + + + + + + + + + + + + + + + + + + project_id + status_name + +
+ + + + + + + + + + + + + + + + + + + + + + + + project_id + tag_name + +
+ + + + + + + + + + + + + + + + + + + + + + + project_id + tasktype_name + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + project_id + version_name + + + project_id + version_tense + +
+ + + + + + + + + + task_id + tag_id + +
+ + UPDATE projects SET visible_fields = 'tasktype category severity priority status private assignedto reportedin dueversion duedate progress os votes' WHERE visible_fields = '' + UPDATE projects SET theme_style = 'CleanFS' + UPDATE prefs SET pref_value = 'CleanFS' WHERE pref_name = 'global_theme' + +
diff --git a/setup/upgrade/1.0/varchartotext.php b/setup/upgrade/1.0/varchartotext.php new file mode 100644 index 0000000..3bba5ea --- /dev/null +++ b/setup/upgrade/1.0/varchartotext.php @@ -0,0 +1,17 @@ +query('ALTER TABLE {prefs} ALTER COLUMN pref_value TYPE text'); + $db->query('ALTER TABLE {prefs} ALTER COLUMN pref_value SET DEFAULT \'\''); +} +elseif($db->dbtype=='mysqli' || $db->dbtype=='mysql') { + $sinfo=$db->dblink->serverInfo(); + if(isset($sinfo['version']) && version_compare($sinfo['version'], '5.5.3')>=0 ){ + $db->query('ALTER TABLE {prefs} CHANGE `pref_value` `pref_value` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL'); + }else{ + $db->query('ALTER TABLE {prefs} CHANGE `pref_value` `pref_value` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL'); + } +} +else{ + $db->query('ALTER TABLE {prefs} CHANGE `pref_value` `pref_value` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL'); +} +?> -- cgit v1.2.3-70-g09d2