1
0
Fork 0
mirror of synced 2024-07-10 00:46:05 +12:00
appwrite/app/config/collections.php

3737 lines
123 KiB
PHP
Raw Normal View History

2019-08-10 02:46:09 +12:00
<?php
2022-05-05 03:00:36 +12:00
use Appwrite\Auth\Auth;
2020-03-29 01:42:16 +13:00
use Utopia\Config\Config;
2021-12-02 00:48:23 +13:00
use Utopia\Database\Database;
2023-02-06 09:07:46 +13:00
use Utopia\Database\Helpers\ID;
2019-08-10 02:46:09 +12:00
2020-10-31 09:04:32 +13:00
$providers = Config::getParam('providers', []);
2021-03-01 00:00:22 +13:00
$auth = Config::getParam('auth', []);
2020-03-29 01:42:16 +13:00
/**
* $collection => id of the parent collection where this will be inserted
* $id => id of this collection
* name => name of this collection
* project => whether this collection should be created per project
* attributes => list of attributes
* indexes => list of indexes
*/
2023-06-15 12:20:18 +12:00
$commonCollections = [
'users' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('users'),
'name' => 'Users',
2021-12-02 00:48:23 +13:00
'attributes' => [
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('email'),
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 320,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
2022-08-25 06:41:26 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('phone'),
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16, // leading '+' and 15 digitts maximum by E.164 format
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2022-08-25 06:41:26 +12:00
],
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('status'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('password'),
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 16384,
'signed' => true,
'required' => false,
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => 'hash', // Hashing algorithm used to hash the password
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 256,
'signed' => true,
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => Auth::DEFAULT_ALGO,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('hashOptions'), // Configuration of hashing algorithm
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 65535,
'signed' => true,
2021-12-02 00:48:23 +13:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => Auth::DEFAULT_ALGO_OPTIONS,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['json'],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('passwordUpdate'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2023-06-15 12:20:18 +12:00
'signed' => false,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('prefs'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 65535,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => new \stdClass(),
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['json'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('registration'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
2021-12-02 00:48:23 +13:00
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('emailVerification'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('phoneVerification'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 0,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2020-11-21 12:31:17 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('reset'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
2020-11-21 12:31:17 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('sessions'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2019-10-06 01:07:52 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQuerySessions'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('tokens'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
2023-06-15 12:20:18 +12:00
'format' => '',
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryTokens'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('memberships'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
2023-06-15 12:20:18 +12:00
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 16384,
'signed' => true,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryMemberships'],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
]
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_email'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['email'],
'lengths' => [320],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_phone'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['phone'],
'lengths' => [16],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_status'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['status'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_passwordUpdate'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['passwordUpdate'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_registration'),
'type' => Database::INDEX_KEY,
'attributes' => ['registration'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_emailVerification'),
'type' => Database::INDEX_KEY,
'attributes' => ['emailVerification'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2021-12-02 00:48:23 +13:00
],
2023-06-15 12:20:18 +12:00
[
'$id' => ID::custom('_key_phoneVerification'),
'type' => Database::INDEX_KEY,
'attributes' => ['phoneVerification'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
2023-06-15 12:20:18 +12:00
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
]
2021-12-02 00:48:23 +13:00
],
],
2023-06-15 12:20:18 +12:00
'tokens' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('tokens'),
'name' => 'Tokens',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userInternalId'),
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userId'),
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
2022-06-16 00:57:06 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('type'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('secret'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 512, // https://www.tutorialspoint.com/how-long-is-the-sha256-hash-in-mysql (512 for encryption)
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('expire'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2023-06-15 12:20:18 +12:00
'signed' => false,
2020-11-21 12:31:17 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2020-11-21 12:31:17 +13:00
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userAgent'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2019-10-06 01:07:52 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('ip'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 45, // https://stackoverflow.com/a/166157/2299554
2021-12-02 00:48:23 +13:00
'signed' => true,
2021-02-17 02:46:16 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
]
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_user'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['userInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2021-12-02 00:48:23 +13:00
],
],
],
2023-06-15 12:20:18 +12:00
'sessions' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('sessions'),
'name' => 'Sessions',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userInternalId'),
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('provider'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('providerUid'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('providerAccessToken'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('providerAccessTokenExpiry'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
2021-12-02 00:48:23 +13:00
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2019-08-10 02:46:09 +12:00
],
2021-02-20 01:12:47 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('providerRefreshToken'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('secret'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 512, // https://www.tutorialspoint.com/how-long-is-the-sha256-hash-in-mysql (512 for encryption)
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2021-02-19 23:02:02 +13:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userAgent'),
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 16384,
'signed' => true,
2021-02-19 23:02:02 +13:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('ip'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 45, // https://stackoverflow.com/a/166157/2299554
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('countryCode'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('osCode'),
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 256,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('osName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2021-03-29 22:16:56 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('osVersion'),
'type' => Database::VAR_STRING,
'format' => '',
2022-07-26 06:49:53 +12:00
'size' => 256,
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-02-19 23:02:02 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('clientType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2021-03-29 22:16:56 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2021-02-19 23:02:02 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2021-02-19 23:02:02 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('clientCode'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2021-02-19 23:02:02 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2021-02-19 23:02:02 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2021-02-19 23:02:02 +13:00
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('clientName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('clientVersion'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('clientEngine'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('clientEngineVersion'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2020-10-31 09:04:32 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deviceName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deviceBrand'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deviceModel'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2020-10-31 09:04:32 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_provider_providerUid'),
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['provider', 'providerUid'],
'lengths' => [100, 100],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
2020-10-31 09:04:32 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_user'),
2022-10-03 20:16:49 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['userInternalId'],
2022-10-03 20:16:49 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-10-31 09:04:32 +13:00
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'teams' => [
2022-11-04 18:12:08 +13:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('teams'),
'name' => 'Teams',
2022-11-04 18:12:08 +13:00
'attributes' => [
2020-10-31 09:04:32 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2022-11-04 18:12:08 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('total'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2022-11-07 10:41:33 +13:00
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2022-11-07 10:41:33 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2020-10-31 09:04:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2020-10-31 09:04:32 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_search'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
2020-10-31 09:04:32 +13:00
],
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
2022-10-03 20:16:49 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_total'),
2022-10-03 20:16:49 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['total'],
2022-11-04 18:12:08 +13:00
'lengths' => [],
2022-10-03 20:16:49 +13:00
'orders' => [Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'memberships' => [
2022-11-04 18:12:08 +13:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('memberships'),
'name' => 'Memberships',
2022-11-04 18:12:08 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userInternalId'),
2022-11-04 18:12:08 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('userId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-11-04 18:12:08 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2022-12-26 01:13:52 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('teamInternalId'),
2022-12-26 01:13:52 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
2022-12-26 01:13:52 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2022-11-04 18:12:08 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('teamId'),
2022-11-04 18:12:08 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('roles'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('invited'),
2022-11-07 10:41:33 +13:00
'type' => Database::VAR_DATETIME,
2022-11-04 18:12:08 +13:00
'format' => '',
2022-11-07 10:41:33 +13:00
'size' => 0,
'signed' => false,
2022-11-04 18:12:08 +13:00
'required' => false,
'default' => null,
'array' => false,
2022-11-07 10:41:33 +13:00
'filters' => ['datetime'],
2022-11-04 18:12:08 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('joined'),
'type' => Database::VAR_DATETIME,
2022-11-04 18:12:08 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
2022-11-04 18:12:08 +13:00
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2022-11-04 18:12:08 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('confirm'),
'type' => Database::VAR_BOOLEAN,
2022-11-04 18:12:08 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
2022-11-04 18:12:08 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('secret'),
'type' => Database::VAR_STRING,
2022-11-04 18:12:08 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
2022-11-04 18:12:08 +13:00
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
2022-11-04 18:12:08 +13:00
],
2022-11-07 02:10:26 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('search'),
2022-11-07 02:10:26 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2022-11-07 02:10:26 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2022-11-07 02:10:26 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2022-11-04 18:12:08 +13:00
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_unique'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['teamInternalId', 'userInternalId'],
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_user'),
2022-11-04 18:12:08 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['userInternalId'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_team'),
'type' => Database::INDEX_KEY,
'attributes' => ['teamInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
2022-11-04 18:12:08 +13:00
'lengths' => [],
'orders' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_userId'),
2022-11-04 18:12:08 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['userId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_teamId'),
'type' => Database::INDEX_KEY,
'attributes' => ['teamId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_invited'),
'type' => Database::INDEX_KEY,
'attributes' => ['invited'],
2022-11-04 18:12:08 +13:00
'lengths' => [],
2023-06-15 12:20:18 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_joined'),
'type' => Database::INDEX_KEY,
'attributes' => ['joined'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_confirm'),
'type' => Database::INDEX_KEY,
'attributes' => ['confirm'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2022-11-04 18:12:08 +13:00
],
],
],
2023-06-15 12:20:18 +12:00
'buckets' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('buckets'),
'name' => 'Buckets',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('enabled'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 0,
'format' => '',
'filters' => [],
2023-02-03 05:36:32 +13:00
'required' => true,
'array' => false,
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'format' => '',
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => true,
'array' => false,
2020-10-31 09:04:32 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('fileSecurity'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 1,
'format' => '',
'filters' => [],
2020-10-31 09:04:32 +13:00
'required' => false,
'array' => false,
],
2021-02-20 01:12:47 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('maximumFileSize'),
'type' => Database::VAR_INTEGER,
'signed' => false,
'size' => 8,
2021-12-02 00:48:23 +13:00
'format' => '',
'filters' => [],
2021-02-20 01:12:47 +13:00
'required' => true,
'array' => false,
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('allowedFileExtensions'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 64,
2021-12-02 00:48:23 +13:00
'format' => '',
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => true,
'array' => true,
2021-02-20 01:12:47 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => 'compression',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 10,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'filters' => [],
'required' => true,
'array' => false,
],
[
'$id' => ID::custom('encryption'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 0,
'format' => '',
'filters' => [],
'required' => true,
2021-02-20 01:12:47 +13:00
'array' => false,
2023-06-15 12:20:18 +12:00
],
[
'$id' => ID::custom('antivirus'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
'size' => 0,
'format' => '',
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => true,
'array' => false,
2021-02-20 01:12:47 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2021-02-20 01:12:47 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-02-20 01:12:47 +13:00
],
2021-12-02 00:48:23 +13:00
'indexes' => [
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_fulltext_name'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['name'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_enabled'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['enabled'],
'lengths' => [],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2021-02-20 01:12:47 +13:00
],
2023-06-15 12:20:18 +12:00
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_fileSecurity'),
'type' => Database::INDEX_KEY,
'attributes' => ['fileSecurity'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_maximumFileSize'),
'type' => Database::INDEX_KEY,
'attributes' => ['maximumFileSize'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_encryption'),
'type' => Database::INDEX_KEY,
'attributes' => ['encryption'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_antivirus'),
'type' => Database::INDEX_KEY,
'attributes' => ['antivirus'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
]
2021-02-20 01:12:47 +13:00
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'stats' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('stats'),
'name' => 'Stats',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('metric'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 255,
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('region'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 255,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('value'),
'type' => Database::VAR_INTEGER,
2022-06-01 03:41:12 +12:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 8,
2022-06-01 03:41:12 +12:00
'signed' => false,
2023-06-15 12:20:18 +12:00
'required' => true,
2022-07-06 04:29:12 +12:00
'default' => null,
2022-06-01 03:41:12 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2022-06-01 03:41:12 +12:00
],
2022-08-05 22:20:48 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('time'),
2022-07-06 04:29:12 +12:00
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2022-07-06 04:29:12 +12:00
'signed' => false,
2021-12-02 00:48:23 +13:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('period'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 4,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('type'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 1,
'signed' => false,
'required' => true,
'default' => 0, // 0 -> count, 1 -> sum
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_time'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['time'],
'lengths' => [],
'orders' => [Database::ORDER_DESC],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_period_time'),
'type' => Database::INDEX_KEY,
'attributes' => ['period', 'time'],
'lengths' => [],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2022-08-05 22:20:48 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_metric_period_time'),
'type' => Database::INDEX_KEY,
'attributes' => ['metric', 'period', 'time'],
'lengths' => [],
'orders' => [Database::ORDER_DESC],
],
],
],
];
$projectCollections = array_merge([
'databases' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('databases'),
'name' => 'Databases',
'attributes' => [
[
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
'size' => 256,
'required' => true,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_name'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['name'],
'lengths' => [256],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'attributes' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('attributes'),
'name' => 'Attributes',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('databaseInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('databaseId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => false,
2023-02-03 05:36:32 +13:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('collectionInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('collectionId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('key'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('type'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2021-12-02 00:48:23 +13:00
],
2022-06-01 03:41:12 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('size'),
'type' => Database::VAR_INTEGER,
2022-06-01 03:41:12 +12:00
'format' => '',
'size' => 0,
2023-06-15 12:20:18 +12:00
'signed' => true,
2022-06-01 03:41:12 +12:00
'required' => false,
2022-07-06 04:29:12 +12:00
'default' => null,
2022-06-01 03:41:12 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2022-06-01 03:41:12 +12:00
],
2022-08-05 22:20:48 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('required'),
'type' => Database::VAR_BOOLEAN,
2022-08-05 22:20:48 +12:00
'format' => '',
'size' => 0,
2023-06-15 12:20:18 +12:00
'signed' => true,
2022-08-05 22:20:48 +12:00
'required' => false,
2022-08-19 21:54:26 +12:00
'default' => null,
2022-06-01 03:41:12 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2022-08-05 22:20:48 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('default'),
2022-08-05 22:20:48 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2022-08-05 22:20:48 +12:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => ['casting'],
],
[
'$id' => ID::custom('signed'),
'type' => Database::VAR_BOOLEAN,
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('array'),
'type' => Database::VAR_BOOLEAN,
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('format'),
'type' => Database::VAR_STRING,
'size' => 64,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('formatOptions'),
'type' => Database::VAR_STRING,
'size' => 16384,
'signed' => true,
'required' => false,
'default' => new stdClass(),
'array' => false,
'filters' => ['json', 'range', 'enum'],
],
[
'$id' => ID::custom('filters'),
'type' => Database::VAR_STRING,
'size' => 64,
'signed' => true,
'required' => false,
2022-08-05 22:20:48 +12:00
'default' => null,
'array' => true,
2022-06-01 03:41:12 +12:00
'filters' => [],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_db_collection'),
2022-08-05 22:20:48 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['databaseInternalId', 'collectionInternalId'],
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
2022-08-05 22:20:48 +12:00
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'indexes' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('indexes'),
'name' => 'Indexes',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('databaseInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('databaseId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2023-06-15 12:20:18 +12:00
'signed' => false,
'required' => true,
2019-08-10 02:46:09 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('collectionInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('collectionId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => true,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('key'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2021-12-09 06:49:44 +13:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('type'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16,
2021-12-02 00:48:23 +13:00
'signed' => true,
2021-12-09 06:49:44 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('attributes'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => true,
'filters' => [],
],
2022-06-08 03:11:07 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('lengths'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
],
[
'$id' => ID::custom('orders'),
2022-06-08 03:11:07 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 4,
2022-06-08 03:11:07 +12:00
'signed' => true,
'required' => false,
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
2022-06-08 03:11:07 +12:00
'filters' => [],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_db_collection'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['databaseInternalId', 'collectionInternalId'],
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
2021-12-02 00:48:23 +13:00
],
],
2023-06-15 12:20:18 +12:00
'functions' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('functions'),
'name' => 'Functions',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('execute'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('enabled'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 0,
'format' => '',
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => true,
'array' => false,
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('runtime'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2022-06-08 21:00:38 +12:00
[
'$id' => ID::custom('deploymentInternalId'),
2022-06-08 21:00:38 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-06-08 21:00:38 +12:00
'signed' => true,
'required' => true,
2022-06-08 21:00:38 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deployment'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('vars'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryVariables'],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('events'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2022-02-05 05:10:52 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('scheduleInternalId'),
2022-05-05 02:37:37 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
'default' => null,
2022-05-05 02:37:37 +12:00
'array' => false,
'filters' => [],
2022-05-05 02:37:37 +12:00
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('scheduleId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('schedule'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2022-06-08 21:00:38 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
2022-06-08 21:00:38 +12:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('timeout'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2020-02-23 21:56:40 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2023-06-15 12:20:18 +12:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
],
2022-06-22 06:02:43 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [768],
2022-06-22 06:02:43 +12:00
'orders' => [Database::ORDER_ASC],
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_enabled'),
2022-08-20 09:10:15 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['enabled'],
2022-08-20 09:10:15 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_runtime'),
2022-08-20 09:10:15 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['runtime'],
'lengths' => [768],
2022-08-20 09:10:15 +12:00
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_deployment'),
2022-08-20 09:10:15 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['deployment'],
2022-08-20 09:10:15 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_schedule'),
2022-08-20 09:10:15 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['schedule'],
2022-08-20 09:10:15 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_timeout'),
2022-08-20 09:10:15 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['timeout'],
2022-08-20 09:10:15 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'deployments' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deployments'),
'name' => 'Deployments',
2022-04-27 23:06:53 +12:00
'attributes' => [
[
'$id' => ID::custom('resourceInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
2022-04-27 23:06:53 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('resourceId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('resourceType'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildInternalId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-04-27 23:06:53 +12:00
'signed' => true,
'required' => true,
2022-04-27 23:06:53 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('buildId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'array' => false,
'$id' => ID::custom('entrypoint'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('path'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('size'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('metadata'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384, // https://tools.ietf.org/html/rfc4288#section-4.2
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['json'],
],
2022-02-01 23:42:11 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('chunksTotal'),
'type' => Database::VAR_INTEGER,
2022-02-01 23:42:11 +13:00
'format' => '',
'size' => 0,
2022-07-06 04:29:12 +12:00
'signed' => false,
2022-02-01 23:42:11 +13:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('chunksUploaded'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('activate'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => false,
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
]
],
'indexes' => [
[
'$id' => ID::custom('_key_resource'),
'type' => Database::INDEX_KEY,
'attributes' => ['resourceId'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_resource_type'),
'type' => Database::INDEX_KEY,
'attributes' => ['resourceType'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_entrypoint'),
'type' => Database::INDEX_KEY,
'attributes' => ['entrypoint'],
'lengths' => [768],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_size'),
'type' => Database::INDEX_KEY,
'attributes' => ['size'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_buildId'),
'type' => Database::INDEX_KEY,
'attributes' => ['buildId'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_activate'),
'type' => Database::INDEX_KEY,
'attributes' => ['activate'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
],
],
'builds' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('builds'),
'name' => 'Builds',
'attributes' => [
[
'$id' => ID::custom('startTime'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
2021-12-02 00:48:23 +13:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2021-12-02 00:48:23 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('endTime'),
2022-07-06 01:06:55 +12:00
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
2022-02-01 23:42:11 +13:00
'size' => 0,
2022-07-06 04:29:12 +12:00
'signed' => false,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('duration'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
'$id' => 'deploymentInternalId',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deploymentId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('runtime'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'default' => '',
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('status'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'default' => 'processing',
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('outputPath'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => '',
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('stderr'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 1000000,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => '',
2019-08-10 02:46:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('stdout'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 1000000,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => '',
2019-08-10 23:38:09 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('sourceType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'default' => 'local',
2020-02-21 09:43:21 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-21 09:43:21 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('source'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'default' => '',
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
]
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2020-02-23 21:56:40 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_deployment'),
2022-04-27 21:13:34 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['deploymentId'],
2022-04-27 21:13:34 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2023-06-15 12:20:18 +12:00
]
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'executions' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('executions'),
'name' => 'Executions',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
'$id' => ID::custom('functionInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('functionId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-21 09:43:21 +13:00
],
[
'$id' => ID::custom('deploymentInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
2021-12-02 00:48:23 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('deploymentId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2020-02-23 21:56:40 +13:00
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-21 09:43:21 +13:00
],
2020-02-23 21:56:40 +13:00
[
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('trigger'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('response'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 1000000,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('stderr'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 1000000,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('stdout'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 1000000,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('statusCode'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('duration'),
'type' => Database::VAR_FLOAT,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => true,
2021-05-18 06:10:17 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
2022-02-17 05:26:05 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
2022-02-17 05:26:05 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2020-02-21 09:43:21 +13:00
],
2021-12-02 00:48:23 +13:00
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_function'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['functionId'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2022-02-17 05:26:05 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_fulltext_search'),
2022-02-17 05:26:05 +13:00
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
2022-08-25 06:41:26 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_trigger'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['trigger'],
2022-08-25 06:41:26 +12:00
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_status'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['status'],
'lengths' => [128],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_statusCode'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['statusCode'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_duration'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['duration'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'variables' => [
'$collection' => Database::METADATA,
'$id' => 'variables',
'name' => 'variables',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-02-21 09:43:21 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => 'functionInternalId',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => 'functionId',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-05 02:35:01 +12:00
'required' => false,
2020-02-21 09:43:21 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-21 09:43:21 +13:00
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => 'key',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => Database::LENGTH_KEY,
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => 'value',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 8192,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [ 'encrypt' ]
2020-05-05 02:35:01 +12:00
],
2020-07-15 04:13:18 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2022-02-17 05:26:05 +13:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-07-15 04:13:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-07-15 04:13:18 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-07-15 04:13:18 +12:00
],
2020-02-21 09:43:21 +13:00
],
2021-12-02 00:48:23 +13:00
'indexes' => [
2022-12-26 01:13:52 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => '_key_function',
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['functionInternalId'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => '_key_uniqueKey',
'type' => Database::INDEX_UNIQUE,
'attributes' => ['functionInternalId', 'key'],
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
'$id' => '_key_key',
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['key'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2022-02-17 05:26:05 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_fulltext_search'),
2022-02-17 05:26:05 +13:00
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
2023-06-15 12:20:18 +12:00
],
],
'cache' => [
'$collection' => Database::METADATA,
'$id' => 'cache',
'name' => 'Cache',
'attributes' => [
2022-08-25 06:41:26 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => 'resource',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-08-25 06:41:26 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => 'accessedAt',
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
2022-08-25 06:41:26 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => 'signature',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-08-25 06:41:26 +12:00
],
2023-06-15 12:20:18 +12:00
],
'indexes' => [
2022-08-25 06:41:26 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => '_key_accessedAt',
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['accessedAt'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
2023-06-15 12:20:18 +12:00
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => '_key_resource',
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['resource'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
2023-06-15 12:20:18 +12:00
'orders' => [],
2022-08-25 06:41:26 +12:00
],
2019-08-10 02:46:09 +12:00
],
],
2023-06-15 12:20:18 +12:00
], $commonCollections);
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
$consoleCollections = array_merge([
'projects' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projects'),
'name' => 'Projects',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-02-21 09:43:21 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('teamInternalId'),
2022-12-26 01:13:52 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2021-12-02 00:48:23 +13:00
'required' => false,
2022-12-26 01:13:52 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('teamId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2022-07-20 19:18:49 +12:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('region'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('description'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
2022-12-26 01:13:52 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('database'),
2022-12-26 01:13:52 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 256,
2022-12-26 01:13:52 +13:00
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
2022-12-26 01:13:52 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('logo'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2022-11-07 10:41:33 +13:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-05 02:35:01 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 08:37:59 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
2020-05-13 10:00:00 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('url'),
2022-11-07 10:41:33 +13:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2022-11-07 10:41:33 +13:00
'signed' => true,
2020-02-21 09:43:21 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2022-11-07 10:41:33 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
2020-02-21 09:43:21 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('version'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-13 10:00:00 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-21 09:43:21 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('legalName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
2022-12-23 06:18:54 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('legalCountry'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2022-12-23 06:18:54 +13:00
'signed' => true,
'required' => false,
2022-12-23 06:18:54 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2020-02-29 19:24:46 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('legalState'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('legalCity'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
],
2022-12-23 06:18:54 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('legalAddress'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2022-12-23 06:18:54 +13:00
'signed' => true,
'required' => false,
2022-12-23 06:18:54 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2020-02-23 21:56:40 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('legalTaxId'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
'signed' => true,
2020-02-23 21:56:40 +13:00
'required' => false,
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('services'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => [],
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['json'],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('auths'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2021-05-18 06:10:17 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => [],
'array' => false,
2022-02-22 21:03:24 +13:00
'filters' => ['json'],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('authProviders'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => [],
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['json', 'encrypt'],
2019-08-10 02:46:09 +12:00
],
2022-02-22 21:03:24 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('platforms'),
2022-02-22 21:03:24 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2022-02-22 21:03:24 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryPlatforms'],
2022-02-22 21:03:24 +13:00
],
2021-12-03 19:58:09 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('webhooks'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
2021-12-03 19:58:09 +13:00
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 16384,
'signed' => true,
2021-12-03 19:58:09 +13:00
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryWebhooks'],
2021-12-03 19:58:09 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('keys'),
'type' => Database::VAR_STRING,
2021-12-03 19:58:09 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
'signed' => true,
2021-12-03 19:58:09 +13:00
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryKeys'],
2021-12-03 19:58:09 +13:00
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('domains'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2019-11-17 11:48:32 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['subQueryDomains'],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
'signed' => true,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_search'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
2019-08-10 02:46:09 +12:00
],
2022-08-25 06:41:26 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_name'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['name'],
'lengths' => [128],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_team'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['teamId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'schedules' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('schedules'),
'name' => 'schedules',
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('resourceType'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 100,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
],
2022-12-21 01:56:56 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('resourceId'),
'type' => Database::VAR_STRING,
2022-12-21 01:56:56 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
2022-12-21 01:56:56 +13:00
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2022-12-21 01:56:56 +13:00
],
2022-01-26 23:49:02 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('resourceUpdatedAt'),
2022-12-21 01:56:56 +13:00
'type' => Database::VAR_DATETIME,
2022-01-26 23:49:02 +13:00
'format' => '',
'size' => 0,
2022-12-21 01:56:56 +13:00
'signed' => false,
2022-01-26 23:49:02 +13:00
'required' => false,
'default' => null,
'array' => false,
2022-12-21 01:56:56 +13:00
'filters' => ['datetime'],
2022-01-26 23:49:02 +13:00
],
2022-12-23 06:18:54 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectId'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2022-01-26 23:49:02 +13:00
'required' => false,
2022-12-23 06:18:54 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('schedule'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 100,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('active'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 0,
'format' => '',
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => null,
'array' => false,
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('region'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 10,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => true,
2023-06-15 12:20:18 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2023-06-15 12:20:18 +12:00
],
'indexes' => [
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_region_resourceType_resourceUpdatedAt'),
'type' => Database::INDEX_KEY,
'attributes' => ['region', 'resourceType','resourceUpdatedAt'],
'lengths' => [],
'orders' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_region_resourceType_projectId_resourceId'),
'type' => Database::INDEX_KEY,
'attributes' => ['region', 'resourceType', 'projectId', 'resourceId'],
'lengths' => [],
'orders' => [],
2019-08-10 02:46:09 +12:00
],
2023-06-15 12:20:18 +12:00
],
],
'platforms' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('platforms'),
'name' => 'platforms',
'attributes' => [
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectId'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('type'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2022-12-23 06:18:54 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2022-12-23 06:18:54 +13:00
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
2022-12-23 06:18:54 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2020-05-13 10:00:00 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('key'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2020-05-13 10:00:00 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-13 10:00:00 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-13 10:00:00 +12:00
],
2022-12-23 06:18:54 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('store'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2022-12-23 06:18:54 +13:00
'signed' => true,
2020-05-13 10:00:00 +12:00
'required' => false,
2022-12-23 06:18:54 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('hostname'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-06-15 12:20:18 +12:00
]
],
'indexes' => [
[
'$id' => ID::custom('_key_project'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-05-05 02:35:01 +12:00
],
2023-06-15 12:20:18 +12:00
],
],
'domains' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('domains'),
'name' => 'domains',
'attributes' => [
2020-07-15 04:13:18 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-05 02:35:01 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('updated'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
2020-05-05 02:35:01 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 08:37:59 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2020-05-05 02:35:01 +12:00
],
2020-05-13 10:00:00 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('domain'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 08:37:59 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
2020-05-13 10:00:00 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('tld'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-13 10:00:00 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-13 10:00:00 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-13 10:00:00 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('registerable'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-13 10:00:00 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-13 10:00:00 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-13 10:00:00 +12:00
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('verification'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => true,
2020-05-05 02:35:01 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 08:37:59 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
2021-08-24 21:32:27 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('certificateId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2021-08-24 21:32:27 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2021-08-24 21:32:27 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
2020-05-06 05:30:12 +12:00
],
2021-12-02 00:48:23 +13:00
'indexes' => [
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_project'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['projectInternalId'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-05-05 02:35:01 +12:00
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2023-06-15 12:20:18 +12:00
'keys' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('keys'),
'name' => 'keys',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-06 07:42:35 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 07:42:35 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 07:42:35 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-06 07:42:35 +12:00
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
2020-07-15 15:38:57 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => 0,
2020-07-15 15:38:57 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-07-15 15:38:57 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('scopes'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('secret'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 512, // Output of \bin2hex(\random_bytes(128)) => string(256) doubling for encryption
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
],
[
'$id' => ID::custom('expire'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('accessedAt'),
2022-07-04 21:55:11 +12:00
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2022-07-06 04:29:12 +12:00
'signed' => false,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
],
2023-06-15 12:20:18 +12:00
[
'$id' => ID::custom('sdks'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'array' => true,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_project'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['projectInternalId'],
'lengths' => [Database::LENGTH_KEY],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
],
2023-06-15 12:20:18 +12:00
[
'$id' => '_key_accessedAt',
'type' => Database::INDEX_KEY,
'attributes' => ['accessedAt'],
'lengths' => [],
'orders' => [],
],
2019-08-10 02:46:09 +12:00
],
],
2022-01-16 19:33:47 +13:00
2023-06-15 12:20:18 +12:00
'webhooks' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('webhooks'),
'name' => 'webhooks',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-10-31 09:04:32 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
2020-05-06 07:42:35 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('projectId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
2020-05-13 10:00:00 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2020-05-06 07:42:35 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-05-06 07:42:35 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
2022-08-04 12:08:16 +12:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
2023-06-15 12:20:18 +12:00
'default' => null,
2020-05-13 10:00:00 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-05-13 10:00:00 +12:00
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('url'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
2023-06-15 12:20:18 +12:00
'default' => null,
2020-05-06 07:42:35 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-05-06 07:42:35 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('httpUser'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('httpPass'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY, // TODO will the length suffice after encryption?
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('security'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => true,
'required' => true,
2023-06-15 12:20:18 +12:00
'default' => null,
2020-05-06 07:42:35 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-05-06 07:42:35 +12:00
],
2020-05-05 02:35:01 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('events'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
'filters' => [],
2020-07-15 15:38:57 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('signatureKey'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 2048,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
],
'indexes' => [
2020-05-06 07:42:35 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_project'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['projectInternalId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
2023-06-15 12:20:18 +12:00
]
],
],
2023-06-15 12:20:18 +12:00
'certificates' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('certificates'),
'name' => 'Certificates',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('domain'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
// The maximum total length of a domain name or number is 255 characters.
// https://datatracker.ietf.org/doc/html/rfc2821#section-4.5.3.1
// https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.2
2021-12-02 00:48:23 +13:00
'size' => 255,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 07:42:35 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-06 07:42:35 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('issueDate'),
'type' => Database::VAR_DATETIME,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
],
2020-07-19 01:49:20 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('renewDate'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => false,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-07-19 01:49:20 +12:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['datetime'],
2020-07-19 01:49:20 +12:00
],
2020-10-31 09:04:32 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('attempts'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2023-06-15 12:20:18 +12:00
'signed' => true,
2022-07-12 03:12:41 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-10-31 09:04:32 +13:00
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
2020-10-31 09:04:32 +13:00
],
2020-05-06 07:42:35 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('log'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-05-06 07:42:35 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-06 07:42:35 +12:00
],
2022-12-13 20:35:05 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('updated'),
2022-12-13 20:35:05 +13:00
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_domain'),
2022-12-13 20:35:05 +13:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['domain'],
'lengths' => [255],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2022-12-13 20:35:05 +13:00
],
],
],
2022-01-19 00:05:04 +13:00
2021-12-02 00:48:23 +13:00
'realtime' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('realtime'),
'name' => 'Realtime Connections',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('container'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('timestamp'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => false,
2021-12-02 00:48:23 +13:00
'required' => false,
'default' => null,
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('value'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [], //TODO: use json filter
]
],
2021-12-02 00:48:23 +13:00
'indexes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_timestamp'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['timestamp'],
'lengths' => [],
'orders' => [Database::ORDER_DESC],
],
]
],
2023-06-15 12:20:18 +12:00
], $commonCollections);
2022-11-24 20:53:52 +13:00
2023-06-15 12:20:18 +12:00
$bucketCollections = [
'files' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom('buckets'),
'$id' => ID::custom('files'),
'$name' => 'Files',
'attributes' => [
[
'array' => false,
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('bucketId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'filters' => [],
],
[
2023-05-08 19:32:29 +12:00
'array' => false,
'$id' => ID::custom('bucketInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('path'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('signature'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('mimeType'),
'type' => Database::VAR_STRING,
'format' => '',
2022-12-06 03:54:13 +13:00
'size' => 255, // https://tools.ietf.org/html/rfc4288#section-4.2
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('metadata'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384, // https://tools.ietf.org/html/rfc4288#section-4.2
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['json'],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('sizeOriginal'),
'type' => Database::VAR_INTEGER,
'format' => '',
2022-01-08 00:29:52 +13:00
'size' => 8,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('sizeActual'),
'type' => Database::VAR_INTEGER,
'format' => '',
2022-01-08 00:29:52 +13:00
'size' => 8,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('algorithm'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('comment'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('openSSLVersion'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 64,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('openSSLCipher'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 64,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('openSSLTag'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('openSSLIV'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('chunksTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('chunksUploaded'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
],
'indexes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
2022-10-27 09:12:46 +13:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_bucket'),
'type' => Database::INDEX_KEY,
'attributes' => ['bucketId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
2022-10-27 08:14:39 +13:00
'lengths' => [768],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_signature'),
'type' => Database::INDEX_KEY,
'attributes' => ['signature'],
2022-10-27 08:14:39 +13:00
'lengths' => [768],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_mimeType'),
'type' => Database::INDEX_KEY,
'attributes' => ['mimeType'],
2022-10-27 08:14:39 +13:00
'lengths' => [],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_sizeOriginal'),
'type' => Database::INDEX_KEY,
'attributes' => ['sizeOriginal'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_chunksTotal'),
'type' => Database::INDEX_KEY,
'attributes' => ['chunksTotal'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_chunksUploaded'),
'type' => Database::INDEX_KEY,
'attributes' => ['chunksUploaded'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
]
],
2023-06-15 12:20:18 +12:00
];
2022-07-20 19:18:49 +12:00
2023-06-15 12:20:18 +12:00
$dbCollections = [
'collections' => [
'$collection' => ID::custom('databases'),
'$id' => ID::custom('collections'),
'name' => 'Collections',
2022-07-20 19:18:49 +12:00
'attributes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('databaseInternalId'),
2022-07-20 19:18:49 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-02-03 05:36:32 +13:00
'required' => true,
2022-07-20 19:18:49 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('databaseId'),
2022-07-20 19:18:49 +12:00
'type' => Database::VAR_STRING,
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => true,
2022-07-20 19:18:49 +12:00
'default' => null,
'array' => false,
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
2022-07-20 19:18:49 +12:00
'type' => Database::VAR_STRING,
2023-06-15 12:20:18 +12:00
'size' => 256,
'required' => true,
2022-07-20 19:18:49 +12:00
'signed' => true,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('enabled'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
'size' => 0,
2022-07-20 19:18:49 +12:00
'format' => '',
2023-06-15 12:20:18 +12:00
'filters' => [],
'required' => true,
'default' => null,
'array' => false,
],
[
'$id' => ID::custom('documentSecurity'),
'type' => Database::VAR_BOOLEAN,
2022-07-20 19:18:49 +12:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'size' => 0,
'format' => '',
'filters' => [],
2022-07-20 19:18:49 +12:00
'required' => true,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
],
[
'$id' => ID::custom('attributes'),
'type' => Database::VAR_STRING,
'size' => 1000000,
'required' => false,
'signed' => true,
'array' => false,
'filters' => ['subQueryAttributes'],
],
[
'$id' => ID::custom('indexes'),
'type' => Database::VAR_STRING,
'size' => 1000000,
'required' => false,
'signed' => true,
'array' => false,
'filters' => ['subQueryIndexes'],
2022-08-27 01:38:39 +12:00
],
[
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2022-07-20 19:18:49 +12:00
],
'indexes' => [
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
2022-07-20 19:18:49 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
2022-07-20 19:18:49 +12:00
],
2022-08-25 03:07:18 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_enabled'),
2022-08-25 03:07:18 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['enabled'],
'lengths' => [],
2022-08-25 03:07:18 +12:00
'orders' => [Database::ORDER_ASC],
],
2022-08-27 01:38:39 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_documentSecurity'),
'type' => Database::INDEX_KEY,
'attributes' => ['documentSecurity'],
2022-08-27 01:38:39 +12:00
'lengths' => [],
2023-06-15 12:20:18 +12:00
'orders' => [Database::ORDER_ASC],
2022-08-27 01:38:39 +12:00
],
2022-07-20 19:18:49 +12:00
],
],
2023-06-15 12:20:18 +12:00
];
$collections = [
'projects' => $projectCollections,
'console' => $consoleCollections,
'buckets' => $bucketCollections,
'databases' => $dbCollections
2023-06-15 13:23:46 +12:00
];
2023-06-15 13:23:46 +12:00
return $collections;