mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
fix metadata creation
This commit is contained in:
parent
e7b9ba70b6
commit
65337bc9e9
1 changed files with 4 additions and 11 deletions
15
app/http.php
15
app/http.php
|
|
@ -91,20 +91,13 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
|
|||
/** @var array $collections */
|
||||
$collections = Config::getParam('collections', []);
|
||||
|
||||
if (!$dbForConsole->exists(App::getEnv('_APP_DB_SCHEMA', 'appwrite'))) {
|
||||
$redis->flushAll();
|
||||
$redis->flushAll();
|
||||
|
||||
Console::success('[Setup] - Creating database: appwrite...');
|
||||
Console::success('[Setup] - Creating database: appwrite...');
|
||||
|
||||
$dbForConsole->create(App::getEnv('_APP_DB_SCHEMA', 'appwrite'));
|
||||
}
|
||||
$dbForConsole->create(App::getEnv('_APP_DB_SCHEMA', 'appwrite'));
|
||||
|
||||
try {
|
||||
Console::success('[Setup] - Creating metadata table: appwrite...');
|
||||
$dbForConsole->createMetadata();
|
||||
} catch (\Throwable $th) {
|
||||
Console::success('[Setup] - Skip: metadata table already exists');
|
||||
}
|
||||
Console::success('[Setup] - Created database: appwrite and metadata tables...');
|
||||
|
||||
if ($dbForConsole->getCollection(Audit::COLLECTION)->isEmpty()) {
|
||||
$audit = new Audit($dbForConsole);
|
||||
|
|
|
|||
Loading…
Reference in a new issue