1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Backward compatibility

This commit is contained in:
Eldad Fux 2021-08-01 16:37:59 +03:00
parent 7144741016
commit f7497784d3
4 changed files with 5 additions and 7 deletions

View file

@ -18,6 +18,7 @@ class Database
const SYSTEM_COLLECTION_PROJECTS = 'projects';
const SYSTEM_COLLECTION_WEBHOOKS = 'webhooks';
const SYSTEM_COLLECTION_KEYS = 'keys';
const SYSTEM_COLLECTION_TASKS = 'tasks';
const SYSTEM_COLLECTION_PLATFORMS = 'platforms';
const SYSTEM_COLLECTION_USAGES = 'usages'; // TODO add structure
const SYSTEM_COLLECTION_DOMAINS = 'domains';

View file

@ -28,12 +28,9 @@ class Event
const WEBHOOK_QUEUE_NAME = 'v1-webhooks';
const WEBHOOK_CLASS_NAME = 'WebhooksV1';
const TASK_CLASS_NAME = 'TasksV1';
const CERTIFICATES_QUEUE_NAME = 'v1-certificates';
const CERTIFICATES_CLASS_NAME = 'CertificatesV1';
/**
* @var string
*/

View file

@ -68,9 +68,9 @@ class V05 extends Migration
$document->setAttribute('security', $document->getAttribute('security') ? true : false);
break;
// case Database::SYSTEM_COLLECTION_TASKS:
// $document->setAttribute('security', $document->getAttribute('security') ? true : false);
// break;
case Database::SYSTEM_COLLECTION_TASKS:
$document->setAttribute('security', $document->getAttribute('security') ? true : false);
break;
case Database::SYSTEM_COLLECTION_USERS:
foreach ($providers as $key => $provider) {

View file

@ -43,7 +43,7 @@ class MigrationV05Test extends MigrationTest
$document = $this->fixDocument(new Document([
'$uid' => 'unique',
'$collection' => Database::SYSTEM_COLLECTION_WEBHOOKS
'$collection' => Database::SYSTEM_COLLECTION_TASKS
]));
$this->assertEquals($document->getAttribute('$uid', null), null);