migrate-db-1.6.x-1.8.0-post.sql 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. -- This script updates the databases structure before migrating the data from
  2. -- version 1.6.x to version 1.8.0
  3. -- it is intended as a standalone script, however, because of the multiple
  4. -- databases related difficulties, it should be parsed by a PHP script in
  5. -- order to connect to and update the right databases.
  6. -- There is one line per query, allowing the PHP function file() to read
  7. -- all lines separately into an array. The xxMAINxx-type markers are there
  8. -- to tell the PHP script which database we're talking about.
  9. -- By always using the keyword "TABLE" in the queries, we should be able
  10. -- to retrieve and modify the table name from the PHP script if needed, which
  11. -- will allow us to deal with the unique-database-type installations
  12. -- This first part is for the main database
  13. -- xxMAINxx
  14. ALTER TABLE sys_announcement DROP COLUMN visible_teacher_temp;
  15. ALTER TABLE sys_announcement DROP COLUMN visible_student_temp;
  16. ALTER TABLE sys_announcement DROP COLUMN visible_guest_temp;
  17. -- DELETE FROM settings_options WHERE variable='showonline';
  18. -- xxSTATSxx
  19. -- xxUSERxx
  20. -- xxSCORMxx
  21. DROP TABLE scorm_main;
  22. DROP TABLE scorm_sco_data;
  23. -- xxCOURSExx
  24. ALTER TABLE quiz DROP COLUMN active_temp;
  25. ALTER TABLE tool DROP COLUMN added_tool_temp;
  26. ALTER TABLE group_info DROP COLUMN tutor_id;
  27. ALTER TABLE group_info DROP COLUMN forum_state;
  28. ALTER TABLE group_info DROP COLUMN forum_id;
  29. ALTER TABLE group_info DROP COLUMN self_registration_allowed_temp;
  30. ALTER TABLE group_info DROP COLUMN self_unregistration_allowed_temp;
  31. ALTER TABLE group_info DROP COLUMN doc_state_temp;
  32. ALTER TABLE group_category DROP COLUMN forum_state;
  33. ALTER TABLE group_category DROP COLUMN self_reg_allowed_temp;
  34. ALTER TABLE group_category DROP COLUMN self_unreg_allowed_temp;
  35. DROP TABLE bb_access;
  36. DROP TABLE bb_banlist;
  37. DROP TABLE bb_categories;
  38. DROP TABLE bb_config;
  39. DROP TABLE bb_disallow;
  40. DROP TABLE bb_forum_access;
  41. DROP TABLE bb_forum_mods;
  42. DROP TABLE bb_forums;
  43. DROP TABLE bb_headermetafooter;
  44. DROP TABLE bb_posts;
  45. DROP TABLE bb_posts_text;
  46. DROP TABLE bb_priv_msgs;
  47. DROP TABLE bb_ranks;
  48. DROP TABLE bb_sessions;
  49. DROP TABLE bb_themes;
  50. DROP TABLE bb_topics;
  51. DROP TABLE bb_users;
  52. DROP TABLE bb_whosonline;
  53. DROP TABLE bb_words;
  54. -- ? DROP TABLE stud_pub_rel_user;