namespace OCA\WorkflowEngine\Migration;
use Doctrine\DBAL\Driver\Statement;
-use OCA\WorkflowEngine\Entity\File;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
$this->populateScopeTable($result);
$result->closeCursor();
-
- $this->populateEntityCol();
- }
-
- protected function populateEntityCol() {
- $qb = $this->dbc->getQueryBuilder();
-
- $qb->update('flow_operations')
- ->set('entity', $qb->createNamedParameter(File::class))
- ->where($qb->expr()->emptyString('entity'))
- ->execute();
}
protected function populateScopeTable(Statement $ids): void {
use Closure;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\Types;
+use OCA\WorkflowEngine\Entity\File;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
$table->addColumn('entity', Types::STRING, [
'notnull' => true,
'length' => 256,
- 'default' => '',
+ 'default' => File::class,
]);
}
if (!$table->hasColumn('events')) {