Skip to content

Commit 6f4c2b3

Browse files
Merge pull request #6181 from mailcow/fix/5703
[Web] Add additional columns to _sogo_static_view
2 parents bb31060 + d08b9ae commit 6f4c2b3

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

data/web/inc/init_db.inc.php

+12-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function init_db_schema() {
33
try {
44
global $pdo;
55

6-
$db_version = "29072024_1000";
6+
$db_version = "20112024_1105";
77

88
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
99
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
@@ -111,6 +111,10 @@ function init_db_schema() {
111111
"c_name" => "VARCHAR(255) NOT NULL",
112112
"c_password" => "VARCHAR(255) NOT NULL DEFAULT ''",
113113
"c_cn" => "VARCHAR(255)",
114+
"c_l" => "VARCHAR(255)",
115+
"c_o" => "VARCHAR(255)",
116+
"c_ou" => "VARCHAR(255)",
117+
"c_telephonenumber" => "VARCHAR(255)",
114118
"mail" => "VARCHAR(255) NOT NULL",
115119
// TODO -> use TEXT and check if SOGo login breaks on empty aliases
116120
"aliases" => "TEXT NOT NULL",
@@ -1004,7 +1008,7 @@ function init_db_schema() {
10041008
)
10051009
),
10061010
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
1007-
),
1011+
),
10081012
"pushover" => array(
10091013
"cols" => array(
10101014
"username" => "VARCHAR(255) NOT NULL",
@@ -1388,7 +1392,7 @@ function init_db_schema() {
13881392
"key_size" => 2048,
13891393
"max_quota_for_domain" => 10240 * 1048576,
13901394
)
1391-
);
1395+
);
13921396
$default_mailbox_template = array(
13931397
"template" => "Default",
13941398
"type" => "mailbox",
@@ -1423,7 +1427,7 @@ function init_db_schema() {
14231427
"acl_quarantine_category" => 1,
14241428
"acl_app_passwds" => 1,
14251429
)
1426-
);
1430+
);
14271431
$stmt = $pdo->prepare("SELECT id FROM `templates` WHERE `type` = :type AND `template` = :template");
14281432
$stmt->execute(array(
14291433
":type" => "domain",
@@ -1437,8 +1441,8 @@ function init_db_schema() {
14371441
":type" => "domain",
14381442
":template" => $default_domain_template["template"],
14391443
":attributes" => json_encode($default_domain_template["attributes"])
1440-
));
1441-
}
1444+
));
1445+
}
14421446
$stmt = $pdo->prepare("SELECT id FROM `templates` WHERE `type` = :type AND `template` = :template");
14431447
$stmt->execute(array(
14441448
":type" => "mailbox",
@@ -1452,8 +1456,8 @@ function init_db_schema() {
14521456
":type" => "mailbox",
14531457
":template" => $default_mailbox_template["template"],
14541458
":attributes" => json_encode($default_mailbox_template["attributes"])
1455-
));
1456-
}
1459+
));
1460+
}
14571461

14581462
if (php_sapi_name() == "cli") {
14591463
echo "DB initialization completed" . PHP_EOL;

0 commit comments

Comments
 (0)