12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace OC\Core\Migrations;
- use Closure;
- use OCP\DB\ISchemaWrapper;
- use OCP\DB\Types;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- class Version25000Date20220515204012 extends SimpleMigrationStep {
- public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
-
- $schema = $schemaClosure();
- if ($schema->hasTable('share')) {
- $shareTable = $schema->getTable('share');
- if (!$shareTable->hasColumn('attributes')) {
- $shareTable->addColumn(
- 'attributes',
- Types::JSON,
- [
- 'default' => null,
- 'notnull' => false
- ]
- );
- }
- }
- return $schema;
- }
- }
|