Skip updating _uid attribute and _permission index
These updates make use of the PDO to manually execute a SQL statement, but the PDO is not available in the new migration platform task. So that we can move forward with the release, we will skip these updates and then figure it out in a subsequent release.
This commit is contained in:
parent
e8f5229756
commit
ccd8c86e88
1 changed files with 22 additions and 19 deletions
|
@ -516,29 +516,32 @@ class V19 extends Migration
|
|||
|
||||
protected function alterPermissionIndex($collectionName): void
|
||||
{
|
||||
try {
|
||||
$table = "`{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collectionName}_perms`";
|
||||
$this->pdo->prepare("
|
||||
ALTER TABLE {$table}
|
||||
DROP INDEX `_permission`,
|
||||
ADD INDEX `_permission` (`_permission`, `_type`, `_document`);
|
||||
")->execute();
|
||||
} catch (\Throwable $th) {
|
||||
Console::warning($th->getMessage());
|
||||
}
|
||||
// try {
|
||||
// // $table = "`{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collectionName}_perms`";
|
||||
// // $this->pdo->prepare("
|
||||
// // ALTER TABLE {$table}
|
||||
// // DROP INDEX `_permission`,
|
||||
// // ADD INDEX `_permission` (`_permission`, `_type`, `_document`);
|
||||
// // ")->execute();
|
||||
// $this->projectDB->deleteIndex($collectionName, '_permission', ['_permission', '_type', '_document']);
|
||||
// $this->projectDB->createIndex($collectionName, '_permission', Database::INDEX_KEY, ['_permission', '_type', '_document'])
|
||||
// } catch (\Throwable $th) {
|
||||
// Console::warning($th->getMessage());
|
||||
// }
|
||||
}
|
||||
|
||||
protected function alterUidType($collectionName): void
|
||||
{
|
||||
try {
|
||||
$table = "`{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collectionName}`";
|
||||
$this->pdo->prepare("
|
||||
ALTER TABLE {$table}
|
||||
CHANGE COLUMN `_uid` `_uid` VARCHAR(255) NOT NULL ;
|
||||
")->execute();
|
||||
} catch (\Throwable $th) {
|
||||
Console::warning($th->getMessage());
|
||||
}
|
||||
// try {
|
||||
// // $table = "`{$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_{$collectionName}`";
|
||||
// // $this->pdo->prepare("
|
||||
// // ALTER TABLE {$table}
|
||||
// // CHANGE COLUMN `_uid` `_uid` VARCHAR(255) NOT NULL ;
|
||||
// // ")->execute();
|
||||
// $this->projectDB->updateAttribute($collectionName, '_uid', type: 'string', size: 255, required: true);
|
||||
// } catch (\Throwable $th) {
|
||||
// Console::warning($th->getMessage());
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue