migrate-db-1.8.6.2-1.8.7-post.sql 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. -- This script updates the databases structure before migrating the data from
  2. -- version 1.8.6.2 to version 1.8.7
  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. --
  13. -- This first part is for the main database
  14. -- xxMAINxx
  15. ALTER TABLE course_module CHANGE name name varchar(255) NOT NULL;
  16. ALTER TABLE sys_calendar CHANGE title title varchar(255) NOT NULL;
  17. ALTER TABLE tag CHANGE tag tag varchar(255) NOT NULL;
  18. -- xxSTATSxx
  19. -- xxUSERxx
  20. -- xxCOURSExx
  21. ALTER TABLE quiz CHANGE title title VARCHAR(255) NOT NULL;
  22. ALTER TABLE quiz CHANGE sound sound VARCHAR(255) DEFAULT NULL;
  23. ALTER TABLE quiz_question CHANGE question question VARCHAR(511) NOT NULL;
  24. ALTER TABLE tool CHANGE name name VARCHAR(255) NOT NULL;
  25. ALTER TABLE tool CHANGE image image VARCHAR(255) default NULL;
  26. ALTER TABLE tool CHANGE admin admin VARCHAR(255) default NULL;
  27. ALTER TABLE tool CHANGE address address VARCHAR(255) default NULL;
  28. ALTER TABLE calendar_event CHANGE title title VARCHAR(255) NOT NULL;
  29. ALTER TABLE student_publication CHANGE url url VARCHAR(255) default NULL;
  30. ALTER TABLE student_publication CHANGE title title VARCHAR(255) default NULL;
  31. ALTER TABLE student_publication CHANGE author author VARCHAR(255) default NULL;
  32. ALTER TABLE lp CHANGE name name varchar(255) NOT NULL;
  33. ALTER TABLE lp_item CHANGE title varchar(511) NOT NULL;
  34. ALTER TABLE lp_item CHANGE description varchar(511) NOT NULL default '';