database.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once '../inc/global.inc.php';
  4. // database changes
  5. exit;
  6. $sql = "ALTER TABLE track_e_exercises ADD COLUMN coment VARCHAR(255);";
  7. Database::query($sql);
  8. $sql = "ALTER TABLE track_e_exercises ADD COLUMN diff VARCHAR(255);";
  9. Database::query($sql);
  10. $sql = "ALTER TABLE track_e_exercises ADD COLUMN mod_no VARCHAR(255);";
  11. Database::query($sql);
  12. $sql = "ALTER TABLE track_e_exercises ADD COLUMN score_ex VARCHAR(255);";
  13. Database::query($sql);
  14. $sql = "ALTER TABLE track_e_exercises ADD COLUMN score_rep1 VARCHAR(255);";
  15. Database::query($sql);
  16. $sql = "ALTER TABLE track_e_exercises ADD COLUMN score_rep2 VARCHAR(255);";
  17. Database::query($sql);
  18. $sql = "ALTER TABLE track_e_exercises ADD COLUMN inter_coment VARCHAR(255);";
  19. Database::query($sql);
  20. $sql = "ALTER TABLE track_e_exercises ADD COLUMN level VARCHAR(255);";
  21. Database::query($sql);
  22. $sql = "CREATE TABLE IF NOT EXISTS set_module (
  23. `id` int(4) NOT NULL AUTO_INCREMENT,
  24. `cours` varchar(40) NOT NULL,
  25. `module` varchar(40) NOT NULL,
  26. `jours` varchar(6) NOT NULL,
  27. `cal_name` varchar(20) NOT NULL,
  28. `cal_day_num` int(6) NOT NULL,
  29. `cal_date` date NOT NULL,
  30. PRIMARY KEY (`id`)
  31. )";
  32. Database::query($sql);
  33. /*$sql = "CREATE TABLE IF NOT EXISTS `kezprerequisites` (
  34. `c_id` int(11) NOT NULL,
  35. `lp_id` int(11) NOT NULL,
  36. `id` int(11) NOT NULL,
  37. `prereq` int(11) DEFAULT NULL,
  38. `disporder` bigint(20) DEFAULT NULL,
  39. PRIMARY KEY (`c_id`,`lp_id`,`id`)
  40. )";*/
  41. $sql = "CREATE TABLE IF NOT EXISTS `c_cal_dates` (
  42. `c_id` int(11) NOT NULL,
  43. `date` date NOT NULL,
  44. `status` varchar(1) NOT NULL,
  45. `horaire_name` varchar(190) DEFAULT NULL,
  46. UNIQUE KEY `temp` (`c_id`,`date`,`horaire_name`),
  47. UNIQUE KEY `indexunique` (`c_id`,`date`,`horaire_name`),
  48. KEY `idx` (`c_id`)
  49. )";
  50. Database::query($sql);
  51. $sql = "CREATE TABLE IF NOT EXISTS `c_cal_horaire` (
  52. `id` int(11) NOT NULL AUTO_INCREMENT,
  53. `c_id` int(11) NOT NULL,
  54. `name` varchar(190) NOT NULL,
  55. `num_minute` int(11) NOT NULL,
  56. `num_hours` int(11) NOT NULL,
  57. `learnpath_dw` varchar(256) NOT NULL,
  58. PRIMARY KEY (`id`),
  59. UNIQUE KEY `c_id` (`c_id`,`name`),
  60. KEY `idx` (`c_id`)
  61. )";
  62. Database::query($sql);
  63. $sql = "CREATE TABLE IF NOT EXISTS `c_cal_set_module` (
  64. `id` int(4) NOT NULL AUTO_INCREMENT,
  65. `c_id` varchar(40) NOT NULL,
  66. `module` varchar(40) NOT NULL,
  67. `minutes` int(6) NOT NULL,
  68. PRIMARY KEY (`id`)
  69. )";
  70. Database::query($sql);
  71. $sql = "CREATE TABLE IF NOT EXISTS `c_cal_temp` (
  72. `c_id` int(11) NOT NULL,
  73. `temp` varchar(250) NOT NULL,
  74. `user` varchar(250) NOT NULL,
  75. KEY `idx` (`c_id`)
  76. )";
  77. Database::query($sql);