diff --git a/app/config/variables.php b/app/config/variables.php index 345e4d7176..7a3ed13049 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -358,15 +358,6 @@ return [ 'question' => '', 'filter' => '' ], - [ - 'name' => '_APP_DB_ADAPTER', - 'description' => 'Which database adapter to use. Must be one of: mariadb, postgresql.', - 'introduction' => '1.6.0', - 'default' => 'mariadb', - 'required' => true, - 'question' => 'Choose your database (mariadb|postgresql)', - 'filter' => '' - ], [ 'name' => '_APP_TRUSTED_HEADERS', 'description' => 'This option allows you to set the list of trusted headers, the value is a comma‑separated list of HTTP header names, evaluated left-to-right for the first valid IP. Header names are treated case-insensitively.', @@ -380,17 +371,71 @@ return [ ], [ 'category' => 'Database', - 'description' => 'Appwrite uses a database for storing user data and metadata. You can choose between MariaDB and MongoDB.', + 'description' => 'Appwrite uses a database for storing user and meta data. You can choose between MariaDB, MongoDB or PostgreSQL.', 'variables' => [ [ 'name' => '_APP_DB_ADAPTER', - 'description' => 'To switch between mariadb and mongoDB', - 'introduction' => '1.8.0', + 'description' => 'Which database to use. Must be one of: MariaDB, MongoDB, or PostgreSQL', + 'introduction' => '1.9.0', 'default' => 'mongodb', 'required' => true, - 'question' => 'Choose your database (mariadb|mongodb)', + 'question' => 'Choose your database (mariadb|mongodb|postgresql)', 'filter' => '' ], + [ + 'name' => '_APP_DB_HOST', + 'description' => 'Database server host name address. Default value is: \'mongodb\'.', + 'introduction' => '', + 'default' => 'mongodb', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_DB_PORT', + 'description' => 'Database server TCP port. Default value is: \'27017\'.', + 'introduction' => '', + 'default' => '27017', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_DB_SCHEMA', + 'description' => 'Database server database schema. Default value is: \'appwrite\'.', + 'introduction' => '', + 'default' => 'appwrite', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_DB_USER', + 'description' => 'Database server user name. Default value is: \'user\'.', + 'introduction' => '', + 'default' => 'user', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_DB_PASS', + 'description' => 'Database server user password. Default value is: \'password\'.', + 'introduction' => '', + 'default' => 'password', + 'required' => false, + 'question' => '', + 'filter' => 'password' + ], + [ + 'name' => '_APP_DB_ROOT_PASS', + 'description' => 'Database server root password. Default value is: \'rootsecretpassword\'.', + 'introduction' => '', + 'default' => 'rootsecretpassword', + 'required' => false, + 'question' => '', + 'filter' => 'password' + ], ], ], [ @@ -435,66 +480,6 @@ return [ ], ], ], - [ - 'category' => 'MariaDB', - 'description' => 'Appwrite is using a MariaDB server for managing persistent database data. The MariaDB env vars are used to allow Appwrite server to connect to the MariaDB container.', - 'variables' => [ - [ - 'name' => '_APP_DB_HOST', - 'description' => 'MariaDB server host name address. Default value is: \'mariadb\'.', - 'introduction' => '', - 'default' => 'mariadb', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_DB_PORT', - 'description' => 'MariaDB server TCP port. Default value is: \'3306\'.', - 'introduction' => '', - 'default' => '3306', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_DB_SCHEMA', - 'description' => 'MariaDB server database schema. Default value is: \'appwrite\'.', - 'introduction' => '', - 'default' => 'appwrite', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_DB_USER', - 'description' => 'MariaDB server user name. Default value is: \'user\'.', - 'introduction' => '', - 'default' => 'user', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_DB_PASS', - 'description' => 'MariaDB server user password. Default value is: \'password\'.', - 'introduction' => '', - 'default' => 'password', - 'required' => false, - 'question' => '', - 'filter' => 'password' - ], - [ - 'name' => '_APP_DB_ROOT_PASS', - 'description' => 'MariaDB server root password. Default value is: \'rootsecretpassword\'.', - 'introduction' => '', - 'default' => 'rootsecretpassword', - 'required' => false, - 'question' => '', - 'filter' => 'password' - ], - ], - ], [ 'category' => 'InfluxDB', 'description' => 'Deprecated since 1.4.8.', diff --git a/src/Appwrite/Auth/OAuth2/Mock.php b/src/Appwrite/Auth/OAuth2/Mock.php index 1182a7c01e..8bbf3647a1 100644 --- a/src/Appwrite/Auth/OAuth2/Mock.php +++ b/src/Appwrite/Auth/OAuth2/Mock.php @@ -56,7 +56,6 @@ class Mock extends OAuth2 */ protected function getTokens(string $code): array { - if (empty($this->tokens)) { $this->tokens = \json_decode($this->request( 'GET', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 460fbd371e..fbc2d08cd1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -63,9 +63,9 @@ class Create extends Action replaceWith: 'tablesDB.createEnumColumn', ), )) - ->param('databaseId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Database ID.', true, ['dbForProject']) - ->param('collectionId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Collection ID.', true, ['dbForProject']) - ->param('key', '', fn (Database $dbForProject) => new Key(false, $dbForProject->getAdapter()->getMaxUIDLength()), 'Attribute Key.', true, ['dbForProject']) + ->param('databaseId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Database ID.', false, ['dbForProject']) + ->param('collectionId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Collection ID.', false, ['dbForProject']) + ->param('key', '', fn (Database $dbForProject) => new Key(false, $dbForProject->getAdapter()->getMaxUIDLength()), 'Attribute Key.', false, ['dbForProject']) ->param('elements', [], new ArrayList(new Text(Database::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of enum values.') ->param('required', null, new Boolean(), 'Is attribute required?') ->param('default', null, new Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)