Skip to content

Commit

Permalink
move insert gameme module in modules table
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrgay committed Jun 17, 2018
1 parent c8e1ef8 commit 0a86f5f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions include/install/db/atutor_upgrade_2.2.3_to_2.2.4.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ CREATE TABLE IF NOT EXISTS `helpme_user` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


INSERT INTO `modules` (`dir_name`, `status`, `privilege`, `admin_privilege`, `cron_interval`, `cron_last_run`) SELECT '_standard/helpme', 2, 0, MAX(admin_privilege) * 2, 0, 0 FROM `modules`;
REPLACE INTO `modules` (`dir_name`, `status`, `privilege`, `admin_privilege`, `cron_interval`, `cron_last_run`) SELECT '_standard/helpme', 2, 0, MAX(admin_privilege) * 2, 0, 0 FROM `modules`;

// Add Gameme as a standard Module
REPLACE INTO `modules` (`dir_name`, `status`, `privilege`, `admin_privilege`, `cron_interval`, `cron_last_run`) SELECT '_standard/gameme', 2, MAX(privilege) * 2, MAX(admin_privilege) * 2, 0, 0 FROM `modules`;

# Update db date fields for compatibility with MySQL 5.7
UPDATE `language_text` SET `revised_date` = NULL WHERE `revised_date` = '0000-00-00 00:00:00';
Expand Down Expand Up @@ -37,10 +40,6 @@ UPDATE `tests` SET `end_date` = NULL WHERE `end_date` = '0000-00-00 00:00:00';



// Add Gameme as a standard Module
INSERT INTO `modules` (`dir_name`, `status`, `privilege`, `admin_privilege`, `cron_interval`, `cron_last_run`) SELECT '_standard/gameme', 2, MAX(privilege) * 2, MAX(admin_privilege) * 2, 0, 0 FROM `modules`;


CREATE TABLE IF NOT EXISTS `gm_badges` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`course_id` int(11) NOT NULL DEFAULT '0',
Expand Down

0 comments on commit 0a86f5f

Please sign in to comment.