diff options
| author | Simon Rettberg | 2025-07-14 16:50:29 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-07-14 16:50:29 +0200 |
| commit | 83c4bb160cea6e7fbadbe4c0876b754f0acf24c5 (patch) | |
| tree | 96b8955da109cd15998e3a84699abb11627cb2c3 /modules-available/locationinfo/install.inc.php | |
| parent | [locationinfo] Remove debug spam (diff) | |
| download | slx-admin-83c4bb160cea6e7fbadbe4c0876b754f0acf24c5.tar.gz slx-admin-83c4bb160cea6e7fbadbe4c0876b754f0acf24c5.tar.xz slx-admin-83c4bb160cea6e7fbadbe4c0876b754f0acf24c5.zip | |
[locationinfo] Add UPCOMING panel type
Diffstat (limited to 'modules-available/locationinfo/install.inc.php')
| -rw-r--r-- | modules-available/locationinfo/install.inc.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/modules-available/locationinfo/install.inc.php b/modules-available/locationinfo/install.inc.php index 42bc8234..732ea6e9 100644 --- a/modules-available/locationinfo/install.inc.php +++ b/modules-available/locationinfo/install.inc.php @@ -26,8 +26,8 @@ $t2 = $res[] = tableCreate('locationinfo_coursebackend', ' $t3 = $res[] = tableCreate('locationinfo_panel', " `paneluuid` char(36) CHARACTER SET ascii NOT NULL, `panelname` varchar(30) NOT NULL, - `locationids` varchar(100) CHARACTER SET ascii NOT NULL, - `paneltype` enum('DEFAULT','SUMMARY', 'URL') NOT NULL, + `locationids` text CHARACTER SET ascii NOT NULL, + `paneltype` enum('DEFAULT', 'SUMMARY', 'URL', 'UPCOMING') NOT NULL, `panelconfig` blob NOT NULL, `lastchange` int(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`paneluuid`), @@ -80,10 +80,8 @@ if ($t1 === UPDATE_DONE) { if ($t3 === UPDATE_NOOP) { Database::exec("ALTER TABLE `locationinfo_panel` CHANGE `paneltype` - `paneltype` ENUM('DEFAULT', 'SUMMARY', 'URL') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL"); + `paneltype` ENUM('DEFAULT', 'SUMMARY', 'URL', 'UPCOMING') NOT NULL"); // 2017-12-02 expand locationids column - Database::exec("ALTER TABLE `locationinfo_panel` CHANGE `locationids` - `locationids` varchar(100) CHARACTER SET ascii NOT NULL"); } // 2017-07-26 Add servername key @@ -105,6 +103,15 @@ if (tableGetConstraints('locationinfo_backendlog', 'serverid', 'locationinfo_coursebackend', 'serverid', 'ON UPDATE CASCADE ON DELETE CASCADE'); } +// 2025-06-17: Make locationds text column +if (stripos(tableColumnType('locationinfo_panel', 'locationids'), 'text') === false) { + if (Database::exec('ALTER TABLE `locationinfo_panel` MODIFY `locationids` text CHAR SET ascii NOT NULL')) { + $res[] = UPDATE_DONE; + } else { + $res[] = UPDATE_FAILED; + } +} + // Create response for browser if (in_array(UPDATE_RETRY, $res)) { |
