Skip to content

Commit 72e9ddd

Browse files
Merge pull request appwrite#5708 from appwrite/chore-update-database-config
feat: update database config
2 parents b0a70d2 + 87aa7ea commit 72e9ddd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/controllers/api/projects.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
$backups['database_db_fra1_02'] = ['from' => '7:30', 'to' => '8:15'];
9595
$backups['database_db_fra1_03'] = ['from' => '10:30', 'to' => '11:15'];
9696
$backups['database_db_fra1_04'] = ['from' => '13:30', 'to' => '14:15'];
97+
$backups['database_db_fra1_05'] = ['from' => '4:30', 'to' => '5:15'];
9798

9899
$databases = Config::getParam('pools-database', []);
99100

@@ -117,7 +118,11 @@
117118
}
118119
}
119120

120-
$database = $databases[array_rand($databases)];
121+
if ($index = array_search('database_db_fra1_05', $databases)) {
122+
$database = $databases[$index];
123+
} else {
124+
$database = $databases[array_rand($databases)];
125+
}
121126

122127
if ($projectId === 'console') {
123128
throw new Exception(Exception::PROJECT_RESERVED_PROJECT, "'console' is a reserved project.");

0 commit comments

Comments
 (0)