Fixed issue #1058 renamed table group to usergroup

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2023-01-29 17:55:41 +01:00
parent 0f7422e199
commit ebab0eabcc
4 changed files with 15 additions and 2 deletions
+7
View File
@@ -1,3 +1,10 @@
1.4.4:
------
Renamed "group" table to "usergroup"
Be sure to run util/db-upgrade.sql on the mysql piler database
1.4.3:
------
+1 -1
View File
@@ -1 +1 @@
1.4.3
1.4.4
+1 -1
View File
@@ -389,7 +389,7 @@ foreach ($config as $k => $v) {
define('TABLE_USER', 'user');
define('TABLE_GROUP', 'group');
define('TABLE_GROUP', 'usergroup');
define('TABLE_GROUP_USER', 'group_user');
define('TABLE_GROUP_EMAIL', 'group_email');
define('TABLE_FOLDER', 'folder');
+6
View File
@@ -6,3 +6,9 @@ alter table sph_index change column todomain todomain blob(512) default null;
alter table metadata change column subject `subject` blob(512) default null;
SELECT Count(*) INTO @exists FROM information_schema.tables WHERE table_schema = 'piler' AND table_type = 'BASE TABLE' AND table_name = 'group';
SET @query = If(@exists>0, 'RENAME TABLE `group` TO usergroup', 'SELECT 1 from dual');
PREPARE stmt FROM @query;
EXECUTE stmt;