1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Merge pull request #4614 from appwrite/update-db-library

feat: update database library
This commit is contained in:
Christy Jacob 2022-10-31 23:41:15 +05:30 committed by GitHub
commit 256046cba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 15 deletions

View file

@ -21,6 +21,8 @@
[English](README.md) | 简体中文
[**我们发布了 Appwrite 1.0 版本!**](https://appwrite.io/1.0)
Appwrite是一个基于Docker的端到端开发者平台其容器化的微服务库可应用于网页端移动端以及后端。Appwrite 通过视觉化界面极简了从零编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。
Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存,图像处理,云函数计算,[等多种服务](https://appwrite.io/docs).

View file

@ -125,7 +125,7 @@ App::post('/v1/projects')
$collections = Config::getParam('collections', []);
$dbForProject->setNamespace("_{$project->getInternalId()}");
$dbForProject->create(App::getEnv('_APP_DB_SCHEMA', 'appwrite'));
$dbForProject->create();
$audit = new Audit($dbForProject);
$audit->setup();

View file

@ -403,11 +403,6 @@ App::error()
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->match($request);
/** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */
if ($error instanceof PDOException) {
throw $error;
}
if ($logger) {
if ($error->getCode() >= 500 || $error->getCode() === 0) {
try {

View file

@ -94,7 +94,7 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
try {
$redis->flushAll();
Console::success('[Setup] - Creating database: appwrite...');
$dbForConsole->create(App::getEnv('_APP_DB_SCHEMA', 'appwrite'));
$dbForConsole->create();
} catch (\Exception $e) {
Console::success('[Setup] - Skip: metadata table already exists');
}
@ -317,13 +317,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
Console::error('[Error] File: ' . $th->getFile());
Console::error('[Error] Line: ' . $th->getLine());
/**
* Reset Database connection if PDOException was thrown.
*/
if ($th instanceof PDOException) {
$db = null;
}
$swooleResponse->setStatusCode(500);
$output = ((App::isDevelopment())) ? [

View file

@ -35,6 +35,7 @@ foreach (
realpath(__DIR__ . '/../vendor/symfony'),
realpath(__DIR__ . '/../vendor/mongodb'),
realpath(__DIR__ . '/../vendor/utopia-php/websocket'), // TODO: remove workerman autoload
realpath(__DIR__ . '/../vendor/utopia-php/cache'), // TODO: remove memcache autoload
] as $key => $value
) {
if ($value !== false) {

9
composer.lock generated
View file

@ -5064,7 +5064,14 @@
"time": "2022-09-28T08:42:51+00:00"
}
],
"aliases": [],
"aliases": [
{
"package": "utopia-php/database",
"version": "0.28.0.0",
"alias": "0.26.99",
"alias_normalized": "0.26.99.0"
}
],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,