1
0
Fork 0
mirror of synced 2024-06-14 08:44:49 +12:00
appwrite/app/config/collections.php

5998 lines
200 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;
2022-12-15 04:42:25 +13:00
use Utopia\Database\Helpers\ID;
2019-08-10 02:46:09 +12:00
2023-10-26 06:33:23 +13:00
$providers = Config::getParam('oAuthProviders', []);
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-08-05 07:15:32 +12:00
$commonCollections = [
2023-12-20 06:05:39 +13:00
'cache' => [
'$collection' => Database::METADATA,
'$id' => 'cache',
'name' => 'Cache',
'attributes' => [
[
'$id' => 'resource',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => 'resourceType',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('mimeType'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255, // https://tools.ietf.org/html/rfc4288#section-4.2
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2023-12-20 06:05:39 +13:00
[
'$id' => 'accessedAt',
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
[
'$id' => 'signature',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 255,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
],
'indexes' => [
[
'$id' => '_key_accessedAt',
'type' => Database::INDEX_KEY,
'attributes' => ['accessedAt'],
'lengths' => [],
'orders' => [],
],
[
'$id' => '_key_resource',
'type' => Database::INDEX_KEY,
'attributes' => ['resource'],
'lengths' => [],
'orders' => [],
],
],
],
2021-12-02 00:48:23 +13:00
'users' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('users'),
2021-12-02 00:48:23 +13:00
'name' => 'Users',
'attributes' => [
[
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,
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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('email'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 320,
'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
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('phone'),
2022-06-08 21:00:38 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16, // leading '+' and 15 digitts maximum by E.164 format
2022-06-08 21:00:38 +12:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('status'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_BOOLEAN,
'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
],
[
2023-08-05 13:07:33 +12:00
'$id' => ID::custom('labels'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-08-05 13:07:33 +12:00
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => null,
2023-08-05 13:07:33 +12:00
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2022-12-16 23:22:39 +13:00
[
'$id' => ID::custom('passwordHistory'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
2022-12-18 19:27:41 +13:00
'filters' => [],
2022-12-16 23:22:39 +13:00
],
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('password'),
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,
2022-05-05 23:53:27 +12:00
'filters' => ['encrypt'],
],
[
'$id' => 'hash', // Hashing algorithm used to hash the password
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
2022-02-05 05:10:52 +13:00
'required' => false,
2022-05-05 03:00:36 +12:00
'default' => Auth::DEFAULT_ALGO,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('hashOptions'), // Configuration of hashing algorithm
2022-05-05 02:37:37 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2022-05-05 03:00:36 +12:00
'size' => 65535,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2022-05-05 03:00:36 +12:00
'default' => Auth::DEFAULT_ALGO_OPTIONS,
2022-05-05 02:37:37 +12:00
'array' => false,
'filters' => ['json'],
],
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('passwordUpdate'),
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,
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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('prefs'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-28 23:48:50 +13:00
'default' => new \stdClass(),
2021-12-02 00:48:23 +13:00
'array' => false,
'filters' => ['json'],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('registration'),
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,
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
],
2021-02-28 23:16:27 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('emailVerification'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
2021-02-28 23:16:27 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2021-02-28 23:16:27 +13:00
],
2022-06-08 21:00:38 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('phoneVerification'),
2022-06-08 21:00:38 +12:00
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2021-02-28 23:16:27 +13:00
],
2021-07-05 19:12:59 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('reset'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_BOOLEAN,
'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' => [],
2021-07-05 19:12:59 +12:00
],
2024-01-10 04:36:49 +13:00
[
'$id' => ID::custom('mfa'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2024-03-02 05:22:51 +13:00
[
'$id' => ID::custom('mfaRecoveryCodes'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
'default' => [],
'array' => true,
2024-03-03 02:05:22 +13:00
'filters' => ['encrypt'],
2024-03-02 05:22:51 +13:00
],
2024-01-10 04:36:49 +13:00
[
2024-03-01 10:07:10 +13:00
'$id' => ID::custom('authenticators'),
2024-01-10 04:36:49 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2024-03-01 09:59:49 +13:00
'size' => 16384,
2024-01-10 04:36:49 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2024-03-01 10:07:10 +13:00
'filters' => ['subQueryAuthenticators'],
2024-01-10 04:36:49 +13:00
],
2019-08-10 02:46:09 +12:00
[
2024-03-01 10:07:10 +13:00
'$id' => ID::custom('sessions'),
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,
2022-04-25 23:43:30 +12:00
'default' => null,
'array' => false,
2024-03-01 10:07:10 +13:00
'filters' => ['subQuerySessions'],
2019-08-10 02:46:09 +12:00
],
[
2024-03-01 10:07:10 +13:00
'$id' => ID::custom('tokens'),
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,
2022-04-27 23:06:53 +12:00
'default' => null,
'array' => false,
2024-03-01 10:07:10 +13:00
'filters' => ['subQueryTokens'],
2019-08-10 02:46:09 +12:00
],
2024-01-10 04:36:49 +13:00
[
'$id' => ID::custom('challenges'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['subQueryChallenges'],
],
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('memberships'),
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,
2022-05-14 00:32:18 +12:00
'default' => null,
2022-04-28 00:44:47 +12:00
'array' => false,
'filters' => ['subQueryMemberships'],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('targets'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['subQueryTargets'],
],
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,
2023-08-05 13:07:33 +12:00
'filters' => ['userSearch'],
2019-08-10 02:46:09 +12:00
],
[
2023-08-05 13:07:33 +12:00
'$id' => ID::custom('accessedAt'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
2023-03-13 23:59:01 +13:00
'signed' => false,
'required' => false,
'default' => null,
2023-03-15 02:20:56 +13:00
'array' => false,
2023-08-05 13:07:33 +12:00
'filters' => ['datetime'],
2024-03-02 05:22:51 +13:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2022-08-20 09:10:15 +12:00
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
],
2021-12-02 00:48:23 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_email'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_UNIQUE,
'attributes' => ['email'],
'lengths' => [320],
'orders' => [Database::ORDER_ASC],
],
2022-06-22 06:02:43 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_phone'),
2022-06-22 06:02:43 +12:00
'type' => Database::INDEX_UNIQUE,
'attributes' => ['phone'],
'lengths' => [16],
'orders' => [Database::ORDER_ASC],
],
2022-08-20 09:10:15 +12:00
[
'$id' => ID::custom('_key_status'),
'type' => Database::INDEX_KEY,
'attributes' => ['status'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_passwordUpdate'),
'type' => Database::INDEX_KEY,
'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],
],
[
'$id' => ID::custom('_key_phoneVerification'),
'type' => Database::INDEX_KEY,
'attributes' => ['phoneVerification'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
2021-12-02 00:48:23 +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' => [],
2023-08-05 13:07:33 +12:00
],
[
'$id' => '_key_accessedAt',
'type' => Database::INDEX_KEY,
'attributes' => ['accessedAt'],
'lengths' => [],
'orders' => [],
2021-12-02 00:48:23 +13:00
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
2022-04-27 23:06:53 +12:00
'tokens' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('tokens'),
2022-04-27 23:06:53 +12:00
'name' => 'Tokens',
'attributes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('userInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'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' => true,
'default' => null,
'array' => false,
'filters' => [],
],
2022-04-27 23:06:53 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('userId'),
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' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('type'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('secret'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 512, // https://www.tutorialspoint.com/how-long-is-the-sha256-hash-in-mysql (512 for encryption)
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('expire'),
2022-07-05 22:59:03 +12:00
'type' => Database::VAR_DATETIME,
2022-04-27 23:06:53 +12:00
'format' => '',
'size' => 0,
2022-07-06 04:29:12 +12:00
'signed' => false,
2022-04-27 23:06:53 +12:00
'required' => false,
'default' => null,
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2022-04-27 23:06:53 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('userAgent'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('ip'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 45, // https://stackoverflow.com/a/166157/2299554
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
]
],
'indexes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_user'),
2022-04-27 23:06:53 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
2022-04-27 23:06:53 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
],
],
2024-03-01 09:59:49 +13:00
'authenticators' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('authenticators'),
'name' => 'Authenticators',
'attributes' => [
[
'$id' => ID::custom('userInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('userId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('type'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('verified'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => false,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('data'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
'signed' => true,
'required' => false,
'default' => [],
'array' => false,
'filters' => ['json', 'encrypt'],
],
],
'indexes' => [
[
'$id' => ID::custom('_key_userInternalId'),
2024-03-01 09:59:49 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
]
],
],
2024-01-10 04:36:49 +13:00
'challenges' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('challenges'),
'name' => 'Challenges',
'attributes' => [
[
'$id' => ID::custom('userInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('userId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2024-03-01 09:59:49 +13:00
'$id' => ID::custom('type'),
2024-01-10 04:36:49 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('token'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 512, // https://www.tutorialspoint.com/how-long-is-the-sha256-hash-in-mysql (512 for encryption)
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
], [
'$id' => ID::custom('code'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 512,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
], [
'$id' => ID::custom('expire'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
]
],
'indexes' => [
[
'$id' => ID::custom('_key_user'),
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
]
],
],
2021-12-02 00:48:23 +13:00
'sessions' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('sessions'),
2021-12-02 00:48:23 +13:00
'name' => 'Sessions',
'attributes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('userInternalId'),
'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' => [],
],
2021-12-02 00:48:23 +13:00
[
2022-08-14 22:33:36 +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,
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
],
[
2022-08-14 22:33:36 +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,
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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('providerUid'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'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' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('providerAccessToken'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
],
2022-02-01 23:42:11 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('providerAccessTokenExpiry'),
2022-07-06 01:06:55 +12:00
'type' => Database::VAR_DATETIME,
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,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2022-02-01 23:42:11 +13:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('providerRefreshToken'),
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,
'filters' => ['encrypt'],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('secret'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 22:47:40 +13: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,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => ['encrypt'],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('userAgent'),
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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('ip'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 45, // https://stackoverflow.com/a/166157/2299554
'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
],
2021-12-02 00:48:23 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('countryCode'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('osCode'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
'filters' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('osName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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-08-14 22:33:36 +12:00
'$id' => ID::custom('osVersion'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('clientType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('clientCode'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('clientName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('clientVersion'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('clientEngine'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('clientEngineVersion'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('deviceName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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 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
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('deviceBrand'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('deviceModel'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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-23 01:35:49 +12:00
[
'$id' => ID::custom('factors'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
2024-02-06 02:22:25 +13:00
'default' => [],
'array' => true,
'filters' => [],
2023-06-23 01:35:49 +12:00
],
2024-01-16 02:43:21 +13:00
[
'$id' => ID::custom('expire'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => true,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
2024-03-03 02:05:22 +13:00
[
'$id' => ID::custom('mfaUpdatedAt'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2020-02-23 21:56:40 +13:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_provider_providerUid'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['provider', 'providerUid'],
'lengths' => [100, 100],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2022-04-27 21:13:34 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_user'),
2022-04-27 21:13:34 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
2022-04-27 21:13:34 +12: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
'identities' => [
2023-02-23 04:07:34 +13:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('identities'),
'name' => 'Identities',
2023-02-23 04:07:34 +13:00
'attributes' => [
[
'$id' => ID::custom('userInternalId'),
2023-02-23 04:07:34 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
2023-02-23 04:07:34 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('userId'),
2023-02-23 04:07:34 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
2023-02-23 04:07:34 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('provider'),
2023-02-23 04:07:34 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
2023-02-23 04:07:34 +13:00
'signed' => true,
'required' => false,
2023-02-23 04:07:34 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('providerUid'),
2023-02-23 04:07:34 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
2023-02-23 04:07:34 +13:00
'signed' => true,
'required' => false,
2023-02-23 04:07:34 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('providerEmail'),
2023-02-23 04:07:34 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 320,
2023-02-23 04:07:34 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('providerAccessToken'),
2023-02-23 04:07:34 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2023-02-23 04:07:34 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
2023-02-23 04:07:34 +13:00
],
2023-03-09 07:30:01 +13:00
[
'$id' => ID::custom('providerAccessTokenExpiry'),
'type' => Database::VAR_DATETIME,
2023-03-09 07:30:01 +13:00
'format' => '',
'size' => 0,
'signed' => false,
2023-03-09 07:30:01 +13:00
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
2023-03-09 07:30:01 +13:00
],
[
'$id' => ID::custom('providerRefreshToken'),
2023-03-09 07:30:01 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2023-03-09 07:30:01 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['encrypt'],
],
[
// Used to store data from provider that may or may not be sensitive
'$id' => ID::custom('secrets'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => [],
'array' => false,
'filters' => ['json', 'encrypt'],
],
2023-02-23 04:07:34 +13:00
],
'indexes' => [
[
'$id' => ID::custom('_key_userInternalId_provider_providerUid'),
2023-02-23 04:07:34 +13:00
'type' => Database::INDEX_UNIQUE,
'attributes' => ['userInternalId', 'provider', 'providerUid'],
'lengths' => [Database::LENGTH_KEY, 100, 385],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_provider_providerUid'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['provider', 'providerUid'],
'lengths' => [100, 640],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_userId'),
'type' => Database::INDEX_KEY,
'attributes' => ['userId'],
2023-02-23 04:07:34 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2023-07-01 18:46:21 +12:00
],
[
'$id' => ID::custom('_key_userInternalId'),
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
2023-07-01 18:46:21 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_provider'),
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['provider'],
'lengths' => [100],
2023-07-01 18:46:21 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerUid'),
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['providerUid'],
2023-07-01 18:46:21 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerEmail'),
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['providerEmail'],
2023-07-01 18:46:21 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerAccessTokenExpiry'),
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['providerAccessTokenExpiry'],
'lengths' => [],
2023-07-01 18:46:21 +12:00
'orders' => [Database::ORDER_ASC],
],
2023-02-23 04:07:34 +13:00
],
],
2021-12-02 00:48:23 +13:00
'teams' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('teams'),
2021-12-02 00:48:23 +13:00
'name' => 'Teams',
'attributes' => [
[
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' => 128,
'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
],
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('total'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'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
],
[
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,
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-03-07 03:24:02 +13:00
[
'$id' => ID::custom('prefs'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
'signed' => true,
'required' => false,
'default' => new \stdClass(),
'array' => false,
'filters' => ['json'],
],
2020-02-23 21:56:40 +13:00
],
2021-12-02 00:48:23 +13:00
'indexes' => [
2020-02-23 21:56:40 +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' => [],
2021-12-02 00:48:23 +13:00
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_total'),
'type' => Database::INDEX_KEY,
'attributes' => ['total'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
2021-12-02 00:48:23 +13:00
],
],
'memberships' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('memberships'),
2021-12-02 00:48:23 +13:00
'name' => 'Memberships',
'attributes' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('userInternalId'),
'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
[
2022-08-14 22:33:36 +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,
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
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('teamInternalId'),
'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,
'filters' => [],
],
[
2022-08-14 22:33:36 +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-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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('roles'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'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' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('invited'),
2022-07-07 19:44:28 +12:00
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2022-07-07 19:44:28 +12:00
'signed' => false,
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,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2020-02-23 21:56:40 +13:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('joined'),
2022-07-07 19:44:28 +12:00
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2022-07-07 19:44:28 +12:00
'signed' => false,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2020-02-23 21:56:40 +13:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('confirm'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_BOOLEAN,
'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' => [],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('secret'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'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-03 01:59:28 +13:00
'filters' => ['encrypt'],
],
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' => [
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_unique'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_UNIQUE,
'attributes' => ['teamInternalId', 'userInternalId'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_user'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'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
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_team'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['teamInternalId'],
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
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_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
[
'$id' => ID::custom('_key_userId'),
'type' => Database::INDEX_KEY,
'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'],
'lengths' => [],
'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],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +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' => [
2020-02-21 09:43:21 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('enabled'),
'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' => '',
2021-12-02 00:48:23 +13:00
'filters' => [],
2023-02-03 05:36:32 +13:00
'required' => true,
'array' => false,
2021-12-02 00:48:23 +13:00
],
2020-05-05 02:35:01 +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,
'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-02-21 09:43:21 +13:00
],
2020-05-05 02:35:01 +12: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' => '',
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-10-31 09:04:32 +13:00
'required' => false,
'array' => false,
2020-05-05 02:35:01 +12:00
],
2020-07-15 04:13:18 +12: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,
2020-07-15 04:13:18 +12:00
],
2020-05-05 02:35:01 +12:00
[
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,
2020-05-05 02:35:01 +12: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' => '',
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => true,
2020-05-06 08:37:59 +12:00
'array' => false,
2020-05-05 02:35:01 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('encryption'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'signed' => true,
'size' => 0,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'filters' => [],
'required' => true,
2020-02-23 21:56:40 +13:00
'array' => false,
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('antivirus'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2021-12-02 00:48:23 +13:00
'size' => 0,
'format' => '',
'filters' => [],
2023-06-15 12:20:18 +12:00
'required' => true,
'array' => false,
2020-02-21 09:43:21 +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,
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
'indexes' => [
2020-02-23 21:56:40 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_fulltext_name'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_FULLTEXT,
2023-06-15 12:20:18 +12:00
'attributes' => ['name'],
2022-10-27 08:14:39 +13:00
'lengths' => [],
2023-08-20 06:26:47 +12:00
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
2023-08-20 06:26:47 +12:00
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('_key_enabled'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['enabled'],
'lengths' => [],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
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'],
2022-10-27 08:14:39 +13:00
'lengths' => [],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_fileSecurity'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['fileSecurity'],
2022-10-27 08:14:39 +13:00
'lengths' => [],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_maximumFileSize'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['maximumFileSize'],
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_encryption'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['encryption'],
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_antivirus'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-06-15 12:20:18 +12:00
'attributes' => ['antivirus'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
2023-06-15 12:20:18 +12:00
]
2020-05-06 05:30:12 +12:00
],
2021-12-02 00:48:23 +13:00
2024-02-01 23:21:50 +13:00
'stats' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
2024-02-01 23:21:50 +13:00
'$id' => ID::custom('stats'),
2024-02-04 21:33:04 +13:00
'name' => 'Stats',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-02-29 19:24:46 +13:00
[
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' => [],
],
[
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,
'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('value'),
'type' => Database::VAR_INTEGER,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 8,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'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('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,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
],
[
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,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
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_UNIQUE,
2023-06-15 12:20:18 +12:00
'attributes' => ['metric', 'period', 'time'],
'lengths' => [],
'orders' => [Database::ORDER_DESC],
],
],
],
'providers' => [
'$collection' => ID::custom(DATABASE::METADATA),
'$id' => ID::custom('providers'),
'name' => 'Providers',
2023-08-05 07:15:32 +12:00
'attributes' => [
[
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
2023-08-05 07:15:32 +12:00
'format' => '',
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
'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
],
2022-02-22 21:03:24 +13:00
[
'$id' => ID::custom('provider'),
2022-02-22 21:03:24 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-02-22 21:03:24 +13:00
'signed' => true,
'required' => true,
2022-02-22 21:03:24 +13:00
'default' => null,
'array' => false,
'filters' => [],
2022-02-22 21:03:24 +13:00
],
2021-12-03 19:58:09 +13:00
[
'$id' => ID::custom('type'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
2021-12-03 19:58:09 +13:00
'format' => '',
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2021-12-03 19:58:09 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('enabled'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2021-12-03 19:58:09 +13:00
'size' => 0,
'format' => '',
'filters' => [],
'required' => true,
'default' => true,
'array' => false,
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('credentials'),
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' => true,
2021-12-03 19:58:09 +13:00
'default' => null,
'array' => false,
'filters' => ['json', 'encrypt'],
2021-12-03 19:58:09 +13:00
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('options'),
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,
'default' => [],
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => ['json'],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
'signed' => true,
'required' => false,
2023-11-14 21:37:52 +13:00
'default' => '',
'array' => false,
2023-11-14 21:37:52 +13:00
'filters' => ['providerSearch'],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
'$id' => ID::custom('_key_provider'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['provider'],
2022-10-27 08:14:39 +13:00
'lengths' => [],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('_key_name'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_FULLTEXT,
2023-06-15 12:20:18 +12:00
'attributes' => ['name'],
'lengths' => [],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_type'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['type'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
2023-11-16 09:00:47 +13:00
'$id' => ID::custom('_key_enabled_type'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-11-21 03:19:15 +13:00
'attributes' => ['enabled', 'type'],
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_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [],
]
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
'messages' => [
'$collection' => ID::custom(DATABASE::METADATA),
'$id' => ID::custom('messages'),
'name' => 'Messages',
'attributes' => [
[
2023-11-29 17:09:44 +13:00
'$id' => ID::custom('providerType'),
'type' => Database::VAR_STRING,
'format' => '',
2023-11-29 17:09:44 +13:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2023-11-29 17:09:44 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => 'processing',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('data'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
'signed' => true,
'required' => true,
2022-08-05 22:20:48 +12:00
'default' => null,
'array' => false,
'filters' => ['json'],
],
2019-08-10 02:46:09 +12:00
[
2023-10-31 07:07:57 +13:00
'$id' => ID::custom('topics'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-10-31 07:07:57 +13:00
'size' => 21845,
'signed' => true,
2023-10-31 07:07:57 +13:00
'required' => false,
'default' => [],
'array' => true,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-10-31 07:07:57 +13:00
'$id' => ID::custom('users'),
'type' => Database::VAR_STRING,
'format' => '',
2023-10-31 07:07:57 +13:00
'size' => 21845,
'signed' => true,
'required' => false,
2023-10-31 07:07:57 +13:00
'default' => [],
'array' => true,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-10-31 07:07:57 +13:00
'$id' => ID::custom('targets'),
'type' => Database::VAR_STRING,
'format' => '',
2023-10-31 07:07:57 +13:00
'size' => 21845,
'signed' => true,
'required' => false,
2023-10-31 07:07:57 +13:00
'default' => [],
'array' => true,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-11-29 17:08:25 +13:00
'$id' => ID::custom('scheduledAt'),
'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,
2019-08-10 02:46:09 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
'filters' => ['datetime'],
2021-12-02 00:48:23 +13:00
],
[
'$id' => ID::custom('scheduleInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('scheduleId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2023-10-07 02:53:46 +13:00
[
'$id' => ID::custom('deliveredAt'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('deliveryErrors'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2023-10-31 07:07:57 +13:00
'$id' => ID::custom('deliveredTotal'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_INTEGER,
'format' => '',
2022-06-01 03:41:12 +12:00
'size' => 0,
'signed' => true,
2023-09-05 08:03:50 +12:00
'required' => false,
'default' => 0,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('search'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 16384,
'signed' => true,
2021-12-09 06:49:44 +13:00
'required' => false,
2020-05-05 02:35:01 +12:00
'default' => '',
'array' => false,
2023-11-14 21:37:52 +13:00
'filters' => ['messageSearch'],
2019-08-10 02:46:09 +12:00
],
2020-05-05 02:35:01 +12:00
],
'indexes' => [
2020-05-05 02:35:01 +12:00
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
2022-08-05 22:20:48 +12:00
],
],
],
'topics' => [
'$collection' => ID::custom(DATABASE::METADATA),
'$id' => ID::custom('topics'),
'name' => 'Topics',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-13 10:00:00 +12:00
[
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
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,
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
],
2024-02-13 17:24:31 +13:00
[
'$id' => ID::custom('subscribe'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
],
2020-07-15 04:13:18 +12:00
[
'$id' => ID::custom('emailTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => 0,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('smsTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => 0,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('pushTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => 0,
2020-07-15 04:13:18 +12:00
'array' => false,
'filters' => [],
],
2023-08-05 07:15:32 +12:00
[
2023-09-01 00:41:56 +12:00
'$id' => ID::custom('targets'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-08-05 07:15:32 +12:00
'size' => 16384,
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-08-05 07:15:32 +12:00
'array' => false,
2023-09-01 00:41:56 +12:00
'filters' => ['subQueryTopicTargets'],
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2020-05-06 05:30:12 +12:00
'required' => false,
2023-11-14 21:37:52 +13:00
'default' => '',
'array' => false,
2023-11-14 21:37:52 +13:00
'filters' => ['topicSearch'],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2022-12-16 23:22:39 +13:00
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['name'],
'lengths' => [],
'orders' => [],
2022-12-16 23:22:39 +13:00
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
2023-10-31 08:42:31 +13:00
'attributes' => ['search'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
]
2021-12-02 00:48:23 +13:00
],
],
'subscribers' => [
'$collection' => ID::custom(DATABASE::METADATA),
'$id' => ID::custom('subscribers'),
'name' => 'Subscribers',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
'$id' => ID::custom('targetId'),
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,
2023-08-05 07:15:32 +12:00
'required' => true,
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
],
[
'$id' => ID::custom('targetInternalId'),
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' => 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
[
'$id' => ID::custom('userId'),
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-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
[
'$id' => ID::custom('userInternalId'),
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-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
],
[
'$id' => ID::custom('topicId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-08-05 07:15:32 +12:00
'required' => true,
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
[
'$id' => ID::custom('topicInternalId'),
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,
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
[
'$id' => ID::custom('providerType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
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' => [],
],
[
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'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-09-01 00:41:56 +12:00
'$id' => ID::custom('_key_targetId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-09-01 00:41:56 +12:00
'attributes' => ['targetId'],
'lengths' => [],
'orders' => [],
2020-05-06 07:42:35 +12:00
],
2022-08-25 06:41:26 +12:00
[
2023-09-01 00:41:56 +12:00
'$id' => ID::custom('_key_targetInternalId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['targetInternalId'],
2022-08-20 09:10:15 +12:00
'lengths' => [],
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('_key_userId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
2023-12-01 11:21:03 +13:00
'attributes' => ['userId'],
'lengths' => [],
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('_key_userInternalId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('_key_topicId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['topicId'],
2022-08-25 06:41:26 +12:00
'lengths' => [],
'orders' => [],
2022-08-25 06:41:26 +12:00
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('_key_topicInternalId'),
'type' => Database::INDEX_KEY,
'attributes' => ['topicInternalId'],
'lengths' => [],
'orders' => [],
],
2024-02-21 13:09:14 +13:00
[
'$id' => ID::custom('_unique_target_topic'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['targetInternalId', 'topicInternalId'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
'targets' => [
'$collection' => ID::custom(DATABASE::METADATA),
'$id' => ID::custom('targets'),
'name' => 'Targets',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-06 07:42:35 +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' => true,
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
[
'$id' => ID::custom('userInternalId'),
2022-06-08 21:00:38 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2022-04-27 23:06:53 +12:00
'size' => Database::LENGTH_KEY,
2022-06-08 21:00:38 +12:00
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-07-15 15:38:57 +12:00
'array' => false,
2022-06-08 21:00:38 +12:00
'filters' => [],
2020-07-15 15:38:57 +12:00
],
[
'$id' => ID::custom('sessionId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('sessionInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2020-07-15 15:38:57 +12:00
[
2023-11-15 01:44:07 +13:00
'$id' => ID::custom('providerType'),
2023-06-15 12:20:18 +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,
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-11-15 01:44:07 +13:00
'$id' => ID::custom('providerId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-11-15 01:44:07 +13:00
'size' => Database::LENGTH_KEY,
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' => [],
],
[
'$id' => ID::custom('providerInternalId'),
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' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
'$id' => ID::custom('identifier'),
2022-12-16 23:22:39 +13:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-09-13 03:23:16 +12:00
'size' => Database::LENGTH_KEY,
2022-12-16 23:22:39 +13:00
'signed' => true,
'required' => true,
2022-12-16 23:22:39 +13:00
'default' => null,
2022-04-27 23:06:53 +12:00
'array' => false,
2022-12-18 19:27:41 +13:00
'filters' => [],
2022-12-16 23:22:39 +13:00
],
[
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
'format' => '',
2023-11-17 00:39:08 +13:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('expired'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => false,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
'$id' => ID::custom('_key_userId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['userId'],
'lengths' => [],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
],
2020-10-31 09:04:32 +13:00
[
'$id' => ID::custom('_key_userInternalId'),
'type' => Database::INDEX_KEY,
'attributes' => ['userInternalId'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2020-10-31 09:04:32 +13:00
],
2020-05-06 07:42:35 +12:00
[
'$id' => ID::custom('_key_providerId'),
'type' => Database::INDEX_KEY,
'attributes' => ['providerId'],
'lengths' => [],
'orders' => [],
2020-05-06 07:42:35 +12:00
],
[
'$id' => ID::custom('_key_providerInternalId'),
'type' => Database::INDEX_KEY,
'attributes' => ['providerInternalId'],
'lengths' => [],
'orders' => [],
2020-05-13 10:00:00 +12:00
],
2020-05-05 02:35:01 +12:00
[
2023-10-04 23:45:59 +13:00
'$id' => ID::custom('_key_identifier'),
2023-11-15 08:54:55 +13:00
'type' => Database::INDEX_UNIQUE,
2023-10-04 23:45:59 +13:00
'attributes' => ['identifier'],
'lengths' => [],
'orders' => [],
2020-05-06 07:42:35 +12:00
],
2021-12-02 00:48:23 +13:00
],
],
];
2021-12-02 00:48:23 +13:00
$projectCollections = array_merge([
'databases' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('databases'),
'name' => 'Databases',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-06 07:42:35 +12:00
[
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
'size' => 256,
'required' => true,
'signed' => true,
'array' => false,
'filters' => [],
2020-05-06 07:42:35 +12:00
],
2020-05-05 02:35:01 +12:00
[
'$id' => ID::custom('enabled'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
'size' => 0,
'format' => '',
'filters' => [],
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => true,
2020-07-15 15:38:57 +12:00
'array' => false,
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'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
[
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
2022-10-27 09:12:46 +13:00
'lengths' => [],
2023-06-15 12:20:18 +12:00
'orders' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [256],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
2023-06-15 12:20:18 +12:00
],
],
'attributes' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('attributes'),
'name' => 'Attributes',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
'$id' => ID::custom('databaseInternalId'),
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,
'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
],
[
'$id' => ID::custom('databaseId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-07-06 04:29:12 +12:00
'signed' => false,
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
2020-07-19 01:49:20 +12:00
[
'$id' => ID::custom('collectionInternalId'),
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-07-19 01:49:20 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-07-19 01:49:20 +12:00
],
2020-10-31 09:04:32 +13:00
[
'$id' => ID::custom('collectionId'),
'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,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2021-02-28 23:16:27 +13:00
[
'$id' => ID::custom('key'),
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-02-28 23:16:27 +13:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2021-02-28 23:16:27 +13:00
],
2022-06-08 21:00:38 +12:00
[
'$id' => ID::custom('type'),
'type' => Database::VAR_STRING,
2022-06-08 21:00:38 +12:00
'format' => '',
'size' => 256,
2022-06-08 21:00:38 +12:00
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2022-06-08 21:00:38 +12:00
'filters' => [],
2021-02-28 23:16:27 +13:00
],
2021-07-05 19:12:59 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('status'),
2022-05-05 02:37:37 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 16,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
2021-07-05 19:12:59 +12:00
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('error'),
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,
2022-04-25 23:43:30 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('size'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2022-04-27 23:06:53 +12:00
'default' => null,
'array' => false,
2022-06-08 21:00:38 +12:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('required'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
2022-05-14 00:32:18 +12:00
'default' => null,
2022-04-28 00:44:47 +12:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2020-02-23 21:56:40 +13:00
[
'$id' => ID::custom('default'),
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' => ['casting'],
],
2022-08-20 09:10:15 +12:00
[
'$id' => ID::custom('signed'),
'type' => Database::VAR_BOOLEAN,
'size' => 0,
'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' => [],
2022-06-22 06:02:43 +12:00
],
2022-08-20 09:10:15 +12:00
[
'$id' => ID::custom('array'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-08-20 09:10:15 +12:00
],
[
'$id' => ID::custom('format'),
'type' => Database::VAR_STRING,
'size' => 64,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-08-20 09:10:15 +12:00
],
[
'$id' => ID::custom('formatOptions'),
'type' => Database::VAR_STRING,
'size' => 16384,
'signed' => true,
'required' => false,
'default' => new stdClass(),
'array' => false,
'filters' => ['json', 'range', 'enum'],
2022-08-20 09:10:15 +12:00
],
[
'$id' => ID::custom('filters'),
'type' => Database::VAR_STRING,
'size' => 64,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
2022-08-20 09:10:15 +12:00
],
[
'$id' => ID::custom('options'),
'type' => Database::VAR_STRING,
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => false,
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,
'filters' => ['json'],
2020-10-31 09:04:32 +13:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2020-05-06 07:42:35 +12:00
[
'$id' => ID::custom('_key_db_collection'),
'type' => Database::INDEX_KEY,
'attributes' => ['databaseInternalId', 'collectionInternalId'],
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
'indexes' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('indexes'),
'name' => 'Indexes',
2022-04-27 23:06:53 +12:00
'attributes' => [
[
'$id' => ID::custom('databaseInternalId'),
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-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
],
[
'$id' => ID::custom('databaseId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2022-04-27 23:06:53 +12:00
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => false,
'required' => true,
2022-04-27 23:06:53 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('collectionInternalId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
2022-04-27 23:06:53 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('collectionId'),
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,
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
],
[
'$id' => ID::custom('key'),
'type' => Database::VAR_STRING,
2022-04-27 23:06:53 +12:00
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2022-04-27 23:06:53 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-04-27 23:06:53 +12:00
],
[
'$id' => ID::custom('type'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
2022-04-27 23:06:53 +12:00
'signed' => true,
'required' => false,
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2022-04-27 23:06:53 +12:00
'filters' => [],
],
[
'$id' => ID::custom('status'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
2022-04-27 23:06:53 +12:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('error'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('attributes'),
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' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('lengths'),
2023-06-15 12:20:18 +12:00
'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,
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
'$id' => ID::custom('orders'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 4,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
2022-02-17 05:26:05 +13:00
'filters' => [],
2023-03-07 03:24:02 +13:00
],
2020-02-23 21:56:40 +13:00
],
2021-12-02 00:48:23 +13:00
'indexes' => [
2020-02-23 21:56:40 +13:00
[
'$id' => ID::custom('_key_db_collection'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'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
],
],
],
'functions' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('functions'),
'name' => 'Functions',
'attributes' => [
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('execute'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('name'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('enabled'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
'size' => 0,
'format' => '',
'filters' => [],
'required' => true,
'array' => false,
2022-08-25 06:41:26 +12:00
],
2022-08-20 09:10:15 +12:00
[
2023-08-06 22:30:38 +12:00
'$id' => ID::custom('live'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
'size' => 0,
'format' => '',
'filters' => [],
'required' => true,
'array' => false,
2022-08-20 09:10:15 +12:00
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('installationId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
2022-04-27 23:06:53 +12:00
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('installationInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2022-04-27 23:06:53 +12:00
[
'$id' => ID::custom('providerRepositoryId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
2022-04-27 23:06:53 +12:00
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('repositoryId'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
2022-04-27 23:06:53 +12:00
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('repositoryInternalId'),
'type' => Database::VAR_STRING,
2022-04-27 23:06:53 +12:00
'format' => '',
'size' => Database::LENGTH_KEY,
2022-04-27 23:06:53 +12:00
'signed' => true,
'required' => false,
2022-04-27 23:06:53 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('providerBranch'),
2022-04-27 23:06:53 +12:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
2022-04-27 23:06:53 +12:00
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerRootDirectory'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
2022-04-27 23:06:53 +12:00
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerSilentMode'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'signed' => true,
2022-04-27 23:06:53 +12:00
'size' => 0,
'format' => '',
'filters' => [],
2022-04-27 23:06:53 +12:00
'required' => false,
'default' => false,
2022-04-27 23:06:53 +12:00
'array' => false,
],
[
'$id' => ID::custom('logging'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
'size' => 0,
'format' => '',
2021-12-02 00:48:23 +13:00
'filters' => [],
'required' => true,
'array' => false,
2019-08-10 02:46:09 +12:00
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('runtime'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('deploymentInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2022-04-27 23:06:53 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('deployment'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'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
[
'$id' => ID::custom('vars'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['subQueryVariables'],
],
2023-09-05 20:21:36 +12:00
[
'$id' => ID::custom('varsProject'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['subQueryProjectVariables'],
],
[
'$id' => ID::custom('events'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
],
[
'$id' => ID::custom('scheduleInternalId'),
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' => false,
2019-08-10 02:46:09 +12:00
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
'$id' => ID::custom('scheduleId'),
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,
2019-08-10 02:46:09 +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' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('schedule'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 128,
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' => [],
],
[
'$id' => ID::custom('timeout'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'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,
'filters' => [],
],
2022-02-17 05:26:05 +13:00
[
'$id' => ID::custom('search'),
2022-02-17 05:26:05 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2022-02-17 05:26:05 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('version'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 8,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => 'v3',
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
],
[
'array' => false,
'$id' => ID::custom('entrypoint'),
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,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'array' => false,
'$id' => ID::custom('commands'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'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,
'filters' => [],
]
],
2021-12-02 00:48:23 +13:00
'indexes' => [
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
2023-08-20 06:26:47 +12:00
'orders' => [],
],
[
'$id' => ID::custom('_key_name'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [768],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_enabled'),
'type' => Database::INDEX_KEY,
'attributes' => ['enabled'],
2022-02-17 05:26:05 +13:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2022-02-17 05:26:05 +13:00
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_installationId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['installationId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_installationInternalId'),
'type' => Database::INDEX_KEY,
'attributes' => ['installationInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerRepositoryId'),
'type' => Database::INDEX_KEY,
'attributes' => ['providerRepositoryId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_repositoryId'),
'type' => Database::INDEX_KEY,
'attributes' => ['repositoryId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_repositoryInternalId'),
'type' => Database::INDEX_KEY,
'attributes' => ['repositoryInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_runtime'),
'type' => Database::INDEX_KEY,
'attributes' => ['runtime'],
'lengths' => [768],
'orders' => [Database::ORDER_ASC],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('_key_deployment'),
'type' => Database::INDEX_KEY,
'attributes' => ['deployment'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
]
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
'deployments' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('deployments'),
'name' => 'Deployments',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-02-21 09:43:21 +13:00
[
'$id' => ID::custom('resourceInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2022-12-26 01:13:52 +13:00
'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
[
'$id' => ID::custom('resourceId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'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
[
'$id' => ID::custom('resourceType'),
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-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
],
[
'$id' => ID::custom('buildInternalId'),
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,
2019-08-10 02:46:09 +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
[
'$id' => ID::custom('buildId'),
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-06 05:30:12 +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' => [],
2020-05-05 02:35:01 +12:00
],
2020-07-15 04:13:18 +12:00
[
'array' => false,
'$id' => ID::custom('entrypoint'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'filters' => [],
2020-07-15 04:13:18 +12:00
],
2020-05-05 02:35:01 +12:00
[
'array' => false,
'$id' => ID::custom('commands'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
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,
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('path'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
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,
2022-11-07 10:41:33 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('type'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
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-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('installationId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'format' => '',
'filters' => [],
2020-05-05 02:35:01 +12:00
'required' => false,
2020-05-06 08:37:59 +12:00
'array' => false,
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('installationInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
2021-12-02 00:48:23 +13:00
'filters' => [],
2019-08-10 02:46:09 +12:00
'required' => false,
2019-08-10 23:38:09 +12:00
'array' => false,
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('providerRepositoryId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
2020-02-21 09:43:21 +13:00
],
[
'$id' => ID::custom('repositoryId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
2022-12-23 06:18:54 +13:00
'filters' => [],
2020-02-23 21:56:40 +13:00
'required' => false,
'array' => false,
],
2020-05-13 10:00:00 +12:00
[
'$id' => ID::custom('repositoryInternalId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => Database::LENGTH_KEY,
'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,
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
'$id' => ID::custom('providerRepositoryName'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
2020-02-21 09:43:21 +13:00
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerRepositoryOwner'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerRepositoryUrl'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerCommitHash'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
2023-08-10 05:35:23 +12:00
[
'$id' => ID::custom('providerCommitAuthorUrl'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerCommitAuthor'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerCommitMessage'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerCommitUrl'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerBranch'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
2023-08-10 05:35:23 +12:00
[
'$id' => ID::custom('providerBranchUrl'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerRootDirectory'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => Database::LENGTH_KEY,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('providerCommentId'),
'type' => Database::VAR_STRING,
'signed' => true,
'size' => 2048,
'format' => '',
'filters' => [],
'required' => false,
'array' => false,
],
[
'$id' => ID::custom('size'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$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'],
],
[
'$id' => ID::custom('chunksTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('chunksUploaded'),
'type' => Database::VAR_INTEGER,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
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' => [],
],
2022-02-01 23:42:11 +13: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' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => false,
2020-02-21 09:43:21 +13:00
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
]
],
'indexes' => [
[
'$id' => ID::custom('_key_resource'),
'type' => Database::INDEX_KEY,
'attributes' => ['resourceId'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2020-02-21 09:43:21 +13: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_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' => '',
'size' => 0,
'signed' => false,
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,
'filters' => ['datetime'],
2020-02-21 09:43:21 +13:00
],
[
'$id' => ID::custom('endTime'),
'type' => Database::VAR_DATETIME,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
'signed' => false,
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,
'filters' => ['datetime'],
2020-02-23 21:56:40 +13:00
],
2020-02-29 19:24:46 +13:00
[
'$id' => ID::custom('duration'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('size'),
'type' => Database::VAR_INTEGER,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 0,
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
],
[
'$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' => false,
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
'$id' => ID::custom('deploymentId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'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
],
[
'$id' => ID::custom('runtime'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('status'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
'default' => 'processing',
'array' => false,
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('path'),
2022-02-22 21:03:24 +13:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => '',
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2022-02-22 21:03:24 +13:00
[
'$id' => ID::custom('logs'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
2021-12-03 19:58:09 +13:00
'format' => '',
'size' => 1000000,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => '',
2021-12-03 19:58:09 +13:00
'array' => false,
'filters' => [],
2021-12-03 19:58:09 +13:00
],
[
'$id' => ID::custom('sourceType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
2021-12-03 19:58:09 +13:00
'format' => '',
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
'default' => 'local',
2021-12-03 19:58:09 +13:00
'array' => false,
'filters' => [],
2021-12-03 19:58:09 +13:00
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('source'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
'default' => '',
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_deployment'),
2023-06-15 12:20:18 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentId'],
2023-06-15 12:20:18 +12: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
'executions' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('executions'),
'name' => 'Executions',
'attributes' => [
[
'$id' => ID::custom('functionInternalId'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('functionId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2023-06-15 12:20:18 +12:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
],
[
'$id' => ID::custom('deploymentInternalId'),
2023-07-11 14:12:28 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
2023-07-11 14:12:28 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
2022-12-21 01:56:56 +13:00
[
'$id' => ID::custom('deploymentId'),
2023-06-15 12:20:18 +12:00
'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
[
'array' => false,
'$id' => ID::custom('trigger'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
'required' => false,
'default' => null,
'filters' => [],
],
[
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2022-01-26 23:49:02 +13:00
[
'$id' => ID::custom('duration'),
'type' => Database::VAR_FLOAT,
'format' => '',
'size' => 0,
'signed' => true,
2023-07-28 19:56:07 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('errors'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
2022-01-26 23:49:02 +13:00
'format' => '',
'size' => 1000000,
2022-01-26 23:49:02 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('logs'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-28 20:48:10 +12:00
'array' => false,
'$id' => ID::custom('requestMethod'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
'required' => false,
'default' => null,
'filters' => [],
],
[
'array' => false,
'$id' => ID::custom('requestPath'),
2023-06-28 20:48:10 +12:00
'type' => Database::VAR_STRING,
2023-06-18 23:38:37 +12:00
'format' => '',
'size' => 2048,
2023-06-28 20:48:10 +12:00
'signed' => true,
'required' => false,
2023-06-28 20:48:10 +12:00
'default' => null,
'filters' => [],
],
[
'$id' => ID::custom('requestHeaders'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['json'],
],
[
'$id' => ID::custom('responseStatusCode'),
'type' => Database::VAR_INTEGER,
2023-06-15 12:20:18 +12:00
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('responseHeaders'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => null,
'array' => false,
'filters' => ['json'],
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
2023-06-15 12:20:18 +12:00
],
'indexes' => [
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('_key_function'),
2023-06-15 12:20:18 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['functionId'],
'lengths' => [Database::LENGTH_KEY],
2023-06-15 12:20:18 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_fulltext_search'),
2023-06-15 12:20:18 +12:00
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_trigger'),
2023-06-15 12:20:18 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['trigger'],
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_status'),
'type' => Database::INDEX_KEY,
'attributes' => ['status'],
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_responseStatusCode'),
'type' => Database::INDEX_KEY,
'attributes' => ['responseStatusCode'],
2023-06-15 12:20:18 +12:00
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_duration'),
'type' => Database::INDEX_KEY,
'attributes' => ['duration'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2023-06-15 12:20:18 +12:00
],
],
'variables' => [
'$collection' => Database::METADATA,
'$id' => 'variables',
'name' => 'variables',
'attributes' => [
[
'$id' => ID::custom('resourceType'),
'type' => Database::VAR_STRING,
2022-02-01 23:42:11 +13:00
'format' => '',
'size' => 100,
'signed' => true,
'required' => true,
2022-02-01 23:42:11 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
2022-02-01 23:42:11 +13:00
],
[
'$id' => ID::custom('resourceInternalId'),
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,
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
],
[
'$id' => ID::custom('resourceId'),
'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,
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
],
[
'$id' => 'key',
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' => 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
],
[
'$id' => 'value',
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 8192,
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' => ['encrypt']
2022-12-23 06:18:54 +13:00
],
2020-05-13 10:00:00 +12:00
[
'$id' => ID::custom('search'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'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' => [],
2019-08-10 02:46:09 +12:00
],
],
'indexes' => [
2021-12-02 00:48:23 +13:00
[
'$id' => '_key_resourceInternalId',
'type' => Database::INDEX_KEY,
'attributes' => ['resourceInternalId'],
'lengths' => [Database::LENGTH_KEY],
2023-08-20 06:26:47 +12:00
'orders' => [],
2022-02-17 05:26:05 +13:00
],
2022-08-25 06:41:26 +12:00
[
2023-08-20 06:26:47 +12:00
'$id' => '_key_resourceType',
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
2023-08-20 06:26:47 +12:00
'attributes' => ['resourceType'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
[
2023-08-20 06:26:47 +12:00
'$id' => '_key_resourceId_resourceType',
'type' => Database::INDEX_KEY,
2023-08-20 06:26:47 +12:00
'attributes' => ['resourceId', 'resourceType'],
'lengths' => [Database::LENGTH_KEY, 100],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
[
'$id' => '_key_uniqueKey',
'type' => Database::INDEX_UNIQUE,
'attributes' => ['resourceId', 'key', 'resourceType'],
'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY, 100],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC, Database::ORDER_ASC],
],
2020-05-05 02:35:01 +12:00
[
'$id' => '_key_key',
'type' => Database::INDEX_KEY,
'attributes' => ['key'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
],
],
'migrations' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('migrations'),
'name' => 'Migrations',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-13 10:00:00 +12:00
[
'$id' => ID::custom('status'),
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,
2023-06-15 12:20:18 +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
],
[
'$id' => ID::custom('stage'),
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,
2023-06-15 12:20:18 +12:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('source'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 8192,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2023-06-28 20:48:10 +12:00
'default' => null,
2021-12-02 00:48:23 +13:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('credentials'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65536,
2021-12-02 00:48:23 +13:00
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => [],
2021-12-02 00:48:23 +13:00
'array' => false,
2023-08-10 10:46:23 +12:00
'filters' => ['json', 'encrypt'],
2023-06-28 20:48:10 +12:00
],
[
'$id' => ID::custom('resources'),
2023-06-28 20:48:10 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => [],
'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
[
'$id' => ID::custom('statusCounters'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 3000,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2023-06-28 20:48:10 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => ['json'],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('resourceData'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 131070,
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,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => ['json'],
2019-08-10 02:46:09 +12:00
],
[
'$id' => ID::custom('errors'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
2023-06-28 20:48:10 +12:00
'default' => null,
'array' => true,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
2023-06-28 20:48:10 +12:00
[
'$id' => ID::custom('search'),
2023-06-28 20:48:10 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2023-06-28 20:48:10 +12:00
'signed' => true,
2020-07-15 04:13:18 +12:00
'required' => false,
2023-06-28 20:48:10 +12:00
'default' => null,
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
[
'$id' => '_key_status',
2022-04-27 21:13:34 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['status'],
2023-07-01 18:46:21 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-05-05 02:35:01 +12:00
],
2020-05-13 10:00:00 +12:00
[
'$id' => '_key_stage',
'type' => Database::INDEX_KEY,
'attributes' => ['stage'],
2023-07-01 18:46:21 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_source',
2023-07-01 18:46:21 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['source'],
2022-04-27 21:13:34 +12:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2023-07-01 18:46:21 +12:00
],
[
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
2023-06-15 12:20:18 +12:00
]
2019-08-10 02:46:09 +12:00
],
],
], $commonCollections);
2021-12-02 00:48:23 +13:00
$consoleCollections = array_merge([
'projects' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('projects'),
'name' => 'Projects',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
'$id' => ID::custom('teamInternalId'),
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' => true,
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
[
'$id' => ID::custom('teamId'),
'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,
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
[
'$id' => ID::custom('name'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
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' => [],
2022-08-25 06:41:26 +12:00
],
2020-05-06 07:42:35 +12:00
[
'$id' => ID::custom('region'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
2021-12-02 00:48:23 +13:00
'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
],
[
'$id' => ID::custom('description'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
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
],
[
'$id' => ID::custom('database'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
'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
],
[
'$id' => ID::custom('logo'),
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,
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
],
[
'$id' => ID::custom('url'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'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,
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
[
'$id' => ID::custom('version'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
2021-12-02 00:48:23 +13:00
'signed' => true,
'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
],
[
'$id' => ID::custom('legalName'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'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-04-27 21:13:34 +12:00
[
'$id' => ID::custom('legalCountry'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
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
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('legalState'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'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
],
2019-08-10 02:46:09 +12:00
[
'$id' => ID::custom('legalCity'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 256,
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('legalAddress'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'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
],
2023-03-07 03:24:02 +13:00
[
'$id' => ID::custom('legalTaxId'),
2023-03-07 03:24:02 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
2023-03-07 03:24:02 +13:00
'signed' => true,
'required' => false,
2022-02-17 05:26:05 +13:00
'default' => null,
2023-03-07 03:24:02 +13:00
'array' => false,
2024-01-09 01:22:33 +13:00
'filters' => [],
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('services'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2023-06-15 12:20:18 +12:00
'signed' => true,
'required' => false,
'default' => [],
'array' => false,
'filters' => ['json'],
2022-08-25 06:41:26 +12:00
],
[
'$id' => ID::custom('smtp'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => [],
'array' => false,
'filters' => ['json', 'encrypt'],
],
2021-12-02 00:48:23 +13:00
[
'$id' => ID::custom('templates'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1000000, // TODO make sure size fits
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
'default' => [],
2020-02-21 09:43:21 +13:00
'array' => false,
'filters' => ['json'],
2020-02-21 09:43:21 +13:00
],
2020-02-23 21:56:40 +13:00
[
'$id' => ID::custom('auths'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => [],
'array' => false,
'filters' => ['json'],
],
[
2023-10-26 06:33:23 +13:00
'$id' => ID::custom('oAuthProviders'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => false,
'default' => [],
2020-02-23 21:56:40 +13:00
'array' => false,
'filters' => ['json', 'encrypt'],
2020-02-23 21:56:40 +13:00
],
[
'$id' => ID::custom('platforms'),
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,
2019-08-10 02:46:09 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-07-15 04:13:18 +12:00
'array' => false,
'filters' => ['subQueryPlatforms'],
2022-02-17 05:26:05 +13:00
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('webhooks'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 16384,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => ['subQueryWebhooks'],
],
[
'$id' => ID::custom('keys'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => 16384,
2023-06-15 12:20:18 +12:00
'signed' => true,
2021-05-18 06:10:17 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => ['subQueryKeys'],
],
2022-02-17 05:26:05 +13:00
[
'$id' => ID::custom('search'),
2022-02-17 05:26:05 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
2022-02-17 05:26:05 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
'$id' => ID::custom('_key_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
2022-02-17 05:26:05 +13:00
'lengths' => [],
'orders' => [],
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_name'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_team'),
'type' => Database::INDEX_KEY,
'attributes' => ['teamId'],
'lengths' => [Database::LENGTH_KEY],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2022-08-25 06:41:26 +12:00
],
2019-08-10 02:46:09 +12:00
],
],
2021-12-02 00:48:23 +13:00
'schedules' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('schedules'),
'name' => 'schedules',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-02-21 09:43:21 +13:00
[
'$id' => ID::custom('resourceType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 100,
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
],
[
'$id' => ID::custom('resourceInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
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
[
'$id' => ID::custom('resourceId'),
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-06 05:30:12 +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' => [],
2020-05-05 02:35:01 +12:00
],
2020-07-15 04:13:18 +12:00
[
'$id' => ID::custom('resourceUpdatedAt'),
'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,
2020-07-15 04:13:18 +12:00
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2020-07-15 04:13:18 +12:00
],
2020-05-05 02:35:01 +12:00
[
'$id' => ID::custom('projectId'),
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
],
[
'$id' => ID::custom('schedule'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 100,
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,
2022-11-07 10:41:33 +13:00
'filters' => [],
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('active'),
'type' => Database::VAR_BOOLEAN,
2021-12-02 00:48:23 +13:00
'signed' => true,
'size' => 0,
'format' => '',
'filters' => [],
2020-05-06 05:30:12 +12:00
'required' => false,
2021-12-02 00:48:23 +13:00
'default' => null,
2020-02-21 09:43:21 +13:00
'array' => false,
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('region'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 10,
2021-12-02 00:48:23 +13:00
'signed' => true,
'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
],
],
2021-12-02 00:48:23 +13:00
'indexes' => [
[
'$id' => ID::custom('_key_region_resourceType_resourceUpdatedAt'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
2023-08-20 06:26:47 +12:00
'attributes' => ['region', 'resourceType', 'resourceUpdatedAt'],
2021-12-02 00:48:23 +13:00
'lengths' => [],
'orders' => [],
2021-12-02 00:48:23 +13:00
],
[
'$id' => ID::custom('_key_region_resourceType_projectId_resourceId'),
'type' => Database::INDEX_KEY,
'attributes' => ['region', 'resourceType', 'projectId', 'resourceId'],
'lengths' => [],
'orders' => [],
],
],
],
2022-11-24 20:53:52 +13:00
'platforms' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('platforms'),
'name' => 'platforms',
2022-07-03 21:36:59 +12:00
'attributes' => [
2022-08-15 21:05:41 +12:00
[
'$id' => ID::custom('projectInternalId'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-12-23 06:18:54 +13:00
'signed' => true,
'required' => true,
'default' => null,
'array' => false,
2022-12-23 06:18:54 +13:00
'filters' => [],
],
2020-05-13 10:00:00 +12:00
[
'$id' => ID::custom('projectId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => Database::LENGTH_KEY,
'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,
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
'$id' => ID::custom('type'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
2021-12-02 00:48:23 +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,
2021-12-02 00:48:23 +13:00
'filters' => [],
2020-02-21 09:43:21 +13:00
],
[
'$id' => ID::custom('name'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => 256,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
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
],
[
'$id' => ID::custom('key'),
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-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
],
2020-02-29 19:24:46 +13:00
[
'$id' => ID::custom('store'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('hostname'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
2021-12-02 00:48:23 +13:00
'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' => [],
]
],
'indexes' => [
[
'$id' => ID::custom('_key_project'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-02-23 21:56:40 +13:00
],
],
],
2023-06-15 12:20:18 +12:00
'keys' => [
'$collection' => ID::custom(Database::METADATA),
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('keys'),
'name' => 'keys',
'attributes' => [
2020-02-23 21:56:40 +13:00
[
'$id' => ID::custom('projectInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
2020-02-23 21:56:40 +13:00
'array' => false,
'filters' => [],
2020-02-23 21:56:40 +13:00
],
[
'$id' => ID::custom('projectId'),
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' => false,
2023-06-15 12:20:18 +12:00
'default' => 0,
'array' => false,
'filters' => [],
],
[
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' => Database::LENGTH_KEY,
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' => [],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('scopes'),
2022-02-22 21:03:24 +13: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,
2021-12-02 00:48:23 +13:00
'default' => null,
2023-06-15 12:20:18 +12:00
'array' => true,
'filters' => [],
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('secret'),
2022-02-22 21:03:24 +13:00
'type' => Database::VAR_STRING,
'format' => '',
2023-08-05 07:15:32 +12:00
'size' => 512, // var_dump of \bin2hex(\random_bytes(128)) => string(256) doubling for encryption
2022-02-22 21:03:24 +13:00
'signed' => true,
'required' => true,
2022-02-22 21:03:24 +13:00
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
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('expire'),
2022-07-12 03:12:41 +12:00
'type' => Database::VAR_DATETIME,
2021-12-03 19:58:09 +13:00
'format' => '',
'size' => 0,
2022-07-12 03:12:41 +12:00
'signed' => false,
2021-12-03 19:58:09 +13:00
'required' => false,
'default' => null,
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2021-12-03 19:58:09 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('accessedAt'),
2022-12-21 01:56:56 +13:00
'type' => Database::VAR_DATETIME,
2021-12-03 19:58:09 +13:00
'format' => '',
'size' => 0,
2022-12-21 01:56:56 +13:00
'signed' => false,
2021-12-03 19:58:09 +13:00
'required' => false,
'default' => null,
'array' => false,
2022-12-21 01:56:56 +13:00
'filters' => ['datetime'],
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('sdks'),
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,
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' => [],
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
[
'$id' => ID::custom('_key_project'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'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
'$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'],
'lengths' => [],
'orders' => [],
2022-08-25 06:41:26 +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
'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',
'attributes' => [
[
'$id' => ID::custom('projectInternalId'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2022-07-20 19:18:49 +12:00
'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' => [],
],
[
'$id' => ID::custom('projectId'),
2022-07-20 19:18:49 +12:00
'type' => Database::VAR_STRING,
2023-06-15 12:20:18 +12:00
'format' => '',
'size' => Database::LENGTH_KEY,
2023-06-15 12:20:18 +12:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('name'),
2023-07-11 14:12:28 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
2022-12-21 01:56:56 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('url'),
'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,
2019-08-10 02:46:09 +12:00
'required' => true,
2022-12-21 01:56:56 +13:00
'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('httpUser'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
2022-01-26 23:49:02 +13:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('httpPass'),
2022-12-23 06:18:54 +13:00
'type' => Database::VAR_STRING,
2022-01-26 23:49:02 +13:00
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY, // TODO will the length suffice after encryption?
2022-01-26 23:49:02 +13:00
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
2023-06-15 12:20:18 +12:00
'filters' => ['encrypt'],
2022-01-26 23:49:02 +13:00
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('security'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
2023-07-30 04:20:20 +12:00
'size' => 0,
'signed' => true,
'required' => true,
'default' => null,
'array' => false,
'filters' => [],
],
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('events'),
'type' => Database::VAR_STRING,
2023-06-15 12:20:18 +12:00
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-06-15 12:20:18 +12:00
'required' => true,
'default' => null,
'array' => true,
'filters' => [],
],
2019-08-10 02:46:09 +12:00
[
2023-06-15 12:20:18 +12:00
'$id' => ID::custom('signatureKey'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
2020-05-05 02:35:01 +12:00
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
2023-11-14 21:50:26 +13:00
[
2023-11-21 03:19:15 +13:00
'$id' => ID::custom('enabled'),
2023-11-14 21:50:26 +13:00
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2023-11-21 03:19:15 +13:00
'size' => 0,
'format' => '',
'filters' => [],
2023-11-14 21:50:26 +13:00
'required' => false,
'default' => true,
'array' => false,
],
[
2023-11-21 03:19:15 +13:00
'$id' => ID::custom('logs'),
'type' => Database::VAR_STRING,
2023-11-14 21:50:26 +13:00
'format' => '',
2023-11-21 03:19:15 +13:00
'size' => 1000000,
2023-11-14 21:50:26 +13:00
'signed' => true,
'required' => false,
2023-11-21 03:19:15 +13:00
'default' => '',
2023-11-14 21:50:26 +13:00
'array' => false,
'filters' => [],
],
[
2023-11-21 03:19:15 +13:00
'$id' => ID::custom('attempts'),
'type' => Database::VAR_INTEGER,
2023-11-14 21:50:26 +13:00
'format' => '',
2023-11-21 03:19:15 +13:00
'size' => 0,
2023-11-14 21:50:26 +13:00
'signed' => true,
'required' => false,
2023-11-21 03:19:15 +13:00
'default' => 0,
2023-11-14 21:50:26 +13:00
'array' => false,
'filters' => [],
],
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_project'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
]
2023-06-15 12:20:18 +12:00
],
],
2021-12-02 00:48:23 +13:00
'certificates' => [
2023-06-15 12:20:18 +12:00
'$collection' => ID::custom(Database::METADATA),
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('certificates'),
2021-12-02 00:48:23 +13:00
'name' => 'Certificates',
2023-06-15 12:20:18 +12:00
'attributes' => [
2019-08-10 02:46:09 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('domain'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13: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
'size' => 255,
'signed' => true,
2022-12-26 00:06:25 +13: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
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('issueDate'),
2022-07-06 04:29:12 +12:00
'type' => Database::VAR_DATETIME,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 0,
2022-07-06 04:29:12 +12:00
'signed' => false,
'required' => false,
2023-06-15 12:20:18 +12:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('renewDate'),
2022-07-06 04:29:12 +12:00
'type' => Database::VAR_DATETIME,
'format' => '',
2021-12-02 00:48:23 +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,
2019-08-10 02:46:09 +12:00
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2022-12-26 00:06:25 +13:00
],
2020-05-13 10:00:00 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('attempts'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'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-03-14 02:35:34 +13:00
'$id' => ID::custom('logs'),
'type' => Database::VAR_STRING,
'format' => '',
2023-03-14 02:35:34 +13:00
'size' => 1000000,
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-13 10:00:00 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('updated'),
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,
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,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2020-05-05 02:35:01 +12:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
2020-07-15 04:13:18 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_domain'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['domain'],
'lengths' => [255],
'orders' => [Database::ORDER_ASC],
],
2019-08-10 02:46:09 +12:00
],
],
2022-01-16 19:33:47 +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' => [
2020-10-31 09:04:32 +13:00
[
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,
2022-07-20 19:18:49 +12:00
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('timestamp'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
2020-05-13 10:00:00 +12:00
'required' => false,
2022-12-23 06:18:54 +13:00
'default' => null,
2019-08-10 02:46:09 +12:00
'array' => false,
2022-08-16 03:03:03 +12:00
'filters' => ['datetime'],
2019-08-10 02:46:09 +12:00
],
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('value'),
2022-05-24 02:54:50 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => 16384,
'signed' => true,
'required' => true,
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' => [], //TODO: use json filter
]
2020-05-05 02:35:01 +12:00
],
'indexes' => [
2020-05-05 02:35:01 +12:00
[
2022-08-14 22:33:36 +12:00
'$id' => ID::custom('_key_timestamp'),
'type' => Database::INDEX_KEY,
2021-12-02 00:48:23 +13:00
'attributes' => ['timestamp'],
'lengths' => [],
'orders' => [Database::ORDER_DESC],
2020-05-05 02:35:01 +12:00
],
2021-12-02 00:48:23 +13:00
]
],
'rules' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('rules'),
'name' => 'Rules',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-13 10:00:00 +12:00
[
'$id' => ID::custom('projectId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-08-05 07:15:32 +12:00
'required' => true,
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
[
'$id' => ID::custom('projectInternalId'),
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,
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
],
2020-07-15 04:13:18 +12:00
[
'$id' => ID::custom('domain'),
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-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
],
[
'$id' => ID::custom('resourceType'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => 100,
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
[
'$id' => ID::custom('resourceInternalId'),
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-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
[
'$id' => ID::custom('resourceId'),
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
],
2020-05-05 02:35:01 +12:00
[
'$id' => ID::custom('status'),
2023-07-30 04:20:20 +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,
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' => [
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_domain'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['domain'],
2021-12-02 00:48:23 +13:00
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-05-05 02:35:01 +12:00
],
[
'$id' => ID::custom('_key_projectInternalId'),
2022-08-25 06:41:26 +12: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],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_projectId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['projectId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
2023-03-29 02:21:42 +13:00
],
2022-08-25 06:41:26 +12:00
[
'$id' => '_key_resourceInternalId',
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['resourceInternalId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_resourceId',
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['resourceId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_resourceType',
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['resourceType'],
2023-08-20 06:26:47 +12:00
'lengths' => [],
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
'installations' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('installations'),
'name' => 'installations',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-05-06 07:42:35 +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,
2023-08-05 07:15:32 +12:00
'required' => true,
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
[
'$id' => ID::custom('projectInternalId'),
2023-06-15 12:20:18 +12:00
'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' => [],
],
[
'$id' => ID::custom('providerInstallationId'),
2023-06-15 12:20:18 +12:00
'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,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
'$id' => ID::custom('organization'),
'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,
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('provider'),
2023-06-15 12:20:18 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
'$id' => ID::custom('personal'),
'type' => Database::VAR_BOOLEAN,
'signed' => true,
2021-12-02 00:48:23 +13:00
'size' => 0,
'format' => '',
2023-06-15 12:20:18 +12:00
'filters' => [],
'required' => false,
'default' => false,
'array' => false,
2023-06-15 12:20:18 +12:00
],
2021-12-02 00:48:23 +13:00
],
'indexes' => [
[
'$id' => ID::custom('_key_projectInternalId'),
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' => ID::custom('_key_projectId'),
2023-06-15 12:20:18 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['projectId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerInstallationId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['providerInstallationId'],
'lengths' => [Database::LENGTH_KEY],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2023-06-15 12:20:18 +12:00
],
2019-08-10 02:46:09 +12:00
],
],
2022-01-16 19:33:47 +13:00
'repositories' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('repositories'),
'name' => 'repositories',
2021-12-02 00:48:23 +13:00
'attributes' => [
2020-10-31 09:04:32 +13:00
[
'$id' => ID::custom('installationId'),
2023-06-15 12:20:18 +12:00
'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-10-31 09:04:32 +13:00
'array' => false,
'filters' => []
2020-10-31 09:04:32 +13:00
],
2020-05-06 07:42:35 +12:00
[
'$id' => ID::custom('installationInternalId'),
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
],
[
'$id' => ID::custom('projectId'),
2023-06-15 12:20:18 +12:00
'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,
'filters' => []
2020-05-13 10:00:00 +12:00
],
2020-05-05 02:35:01 +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' => 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
],
[
'$id' => ID::custom('providerRepositoryId'),
'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,
'array' => false,
'filters' => []
],
[
'$id' => ID::custom('resourceId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2023-06-15 12:20:18 +12:00
'signed' => true,
'required' => true,
2023-06-15 12:20:18 +12:00
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
'$id' => ID::custom('resourceInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2023-06-15 12:20:18 +12:00
'signed' => true,
'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
],
2020-05-05 02:35:01 +12:00
[
'$id' => ID::custom('resourceType'),
'type' => Database::VAR_STRING,
'format' => '',
2023-06-15 12:20:18 +12:00
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
2020-07-15 15:38:57 +12:00
'array' => false,
'filters' => []
2020-07-15 15:38:57 +12:00
],
[
'$id' => ID::custom('providerPullRequestIds'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => true,
2019-08-10 02:46:09 +12:00
'required' => false,
'default' => null,
'array' => true,
'filters' => [],
2019-08-10 02:46:09 +12:00
],
],
'indexes' => [
2020-05-06 07:42:35 +12:00
[
'$id' => ID::custom('_key_installationId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['installationId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2020-05-06 07:42:35 +12:00
],
[
'$id' => ID::custom('_key_installationInternalId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['installationInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_projectInternalId'),
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],
],
[
'$id' => ID::custom('_key_projectId'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['projectId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerRepositoryId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['providerRepositoryId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
2020-05-06 07:42:35 +12:00
],
[
'$id' => ID::custom('_key_resourceId'),
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['resourceId'],
'lengths' => [Database::LENGTH_KEY],
2021-12-02 00:48:23 +13:00
'orders' => [Database::ORDER_ASC],
2020-05-06 07:42:35 +12:00
],
[
'$id' => '_key_resourceInternalId',
2021-12-02 00:48:23 +13:00
'type' => Database::INDEX_KEY,
'attributes' => ['resourceInternalId'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
2019-08-10 02:46:09 +12:00
],
2022-08-25 06:41:26 +12:00
[
'$id' => ID::custom('_key_resourceType'),
2022-08-25 06:41:26 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['resourceType'],
'lengths' => [Database::LENGTH_KEY],
2022-08-25 06:41:26 +12:00
'orders' => [Database::ORDER_ASC],
2023-06-15 12:20:18 +12:00
]
2019-08-10 02:46:09 +12:00
],
],
2022-01-19 00:05:04 +13:00
'vcsComments' => [
2022-08-14 22:33:36 +12:00
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('vcsComments'),
'name' => 'vcsComments',
2021-12-02 00:48:23 +13:00
'attributes' => [
[
'$id' => ID::custom('installationId'),
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,
'filters' => []
],
[
'$id' => ID::custom('installationInternalId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2021-12-02 00:48:23 +13:00
'required' => false,
'default' => null,
'array' => false,
2021-12-02 00:48:23 +13:00
'filters' => [],
],
[
'$id' => ID::custom('projectId'),
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,
'filters' => []
2021-12-02 00:48:23 +13:00
],
2022-08-15 21:05:41 +12:00
[
'$id' => ID::custom('projectInternalId'),
2022-08-15 21:05:41 +12:00
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
2022-08-15 21:05:41 +12:00
'signed' => true,
'required' => true,
2022-08-15 21:05:41 +12:00
'default' => null,
'array' => false,
'filters' => [],
],
2022-07-03 21:36:59 +12:00
[
'$id' => ID::custom('providerRepositoryId'),
2021-12-02 00:48:23 +13:00
'type' => Database::VAR_STRING,
2022-07-03 21:36:59 +12:00
'format' => '',
'size' => Database::LENGTH_KEY,
2021-12-02 00:48:23 +13:00
'signed' => true,
'required' => true,
2022-07-03 21:36:59 +12:00
'default' => null,
'array' => false,
'filters' => []
2022-08-15 21:05:41 +12:00
],
[
'$id' => ID::custom('providerCommentId'),
2022-08-15 21:05:41 +12:00
'type' => Database::VAR_STRING,
'format' => '',
2021-12-02 00:48:23 +13:00
'size' => Database::LENGTH_KEY,
2022-08-15 21:05:41 +12:00
'signed' => true,
'required' => true,
2022-08-15 21:05:41 +12:00
'default' => null,
'array' => false,
'filters' => []
],
[
'$id' => ID::custom('providerPullRequestId'),
'type' => Database::VAR_STRING,
2021-12-02 00:48:23 +13:00
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
2021-12-02 00:48:23 +13:00
'default' => null,
'array' => false,
'filters' => []
],
[
'$id' => ID::custom('providerBranch'),
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,
'array' => false,
'filters' => []
2022-07-03 21:36:59 +12:00
],
],
2022-07-03 21:36:59 +12:00
'indexes' => [
[
'$id' => ID::custom('_key_installationId'),
2022-07-03 21:36:59 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['installationId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2022-07-03 21:36:59 +12:00
],
2022-08-16 01:55:11 +12:00
[
'$id' => ID::custom('_key_installationInternalId'),
2022-08-16 01:55:11 +12:00
'type' => Database::INDEX_KEY,
'attributes' => ['installationInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_projectInternalId'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_projectId'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerRepositoryId'),
'type' => Database::INDEX_KEY,
'attributes' => ['providerRepositoryId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerPullRequestId'),
'type' => Database::INDEX_KEY,
'attributes' => ['providerPullRequestId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerBranch'),
'type' => Database::INDEX_KEY,
'attributes' => ['providerBranch'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
2022-08-16 01:55:11 +12:00
],
2022-07-03 21:36:59 +12:00
],
],
2023-08-06 20:51:53 +12:00
'vcsCommentLocks' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('vcsCommentLocks'),
'name' => 'vcsCommentLocks',
'attributes' => [],
'indexes' => []
],
2023-08-05 07:15:32 +12:00
], $commonCollections);
2022-11-24 20:53:52 +13:00
2023-08-05 07:15:32 +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' => [],
],
[
'array' => false,
2023-05-08 19:32:29 +12:00
'$id' => ID::custom('bucketInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
2023-05-08 19:32:29 +12:00
'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' => [],
2023-08-20 06:26:47 +12:00
'orders' => [],
],
[
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-08-05 07:15:32 +12:00
];
2022-07-20 19:18:49 +12:00
2023-08-05 07:15:32 +12:00
$dbCollections = [
2023-06-15 12:20:18 +12:00
'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
2023-08-05 07:15:32 +12:00
$collections = [
2023-06-15 12:20:18 +12:00
'projects' => $projectCollections,
'console' => $consoleCollections,
'buckets' => $bucketCollections,
'databases' => $dbCollections
];
2022-01-19 00:05:04 +13:00
return $collections;