mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-24 02:03:23 +00:00
[Web] Do not break init_db when switching branches
This commit is contained in:
1 parent
5030ce7547
commit
7a69586d91
1 file changed
+4
@@ -625,9 +625,13 @@ function init_db_schema() {
|
|||||||
$stmt = $pdo->query("SHOW TABLES LIKE 'quarantaine'");
|
$stmt = $pdo->query("SHOW TABLES LIKE 'quarantaine'");
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
if ($num_results != 0) {
|
if ($num_results != 0) {
|
||||||
|
$stmt = $pdo->query("SHOW TABLES LIKE 'quarantine'");
|
||||||
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
|
if ($num_results == 0) {
|
||||||
$pdo->query("RENAME TABLE `quarantaine` TO `quarantine`");
|
$pdo->query("RENAME TABLE `quarantaine` TO `quarantine`");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$stmt = $pdo->query("SHOW TABLES LIKE '" . $table . "'");
|
$stmt = $pdo->query("SHOW TABLES LIKE '" . $table . "'");
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
if ($num_results != 0) {
|
if ($num_results != 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user