From 6aec8ad02cacd240ed1deff69f38ebba717bbda4 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 28 Feb 2022 13:39:19 +0545 Subject: [PATCH] fix creating default bucket --- app/http.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/http.php b/app/http.php index adc3b3c939..7d8fb4f71c 100644 --- a/app/http.php +++ b/app/http.php @@ -164,6 +164,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { '$write' => ['role:all'], 'search' => 'buckets Default', ])); + + $bucket = $dbForConsole->getDocument('buckets', 'default'); Console::success('[Setup] - Creating files collection for default bucket...'); $files = $collections['files'] ?? []; @@ -196,7 +198,7 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { ]); } - $dbForConsole->createCollection('bucket_' . 'default', $attributes, $indexes); + $dbForConsole->createCollection('bucket_' . $bucket->getInternalId(), $attributes, $indexes); } Console::success('[Setup] - Server database init completed...');