12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- declare(strict_types=1);
- namespace OC\Core\Migrations;
- use Closure;
- use OCP\DB\ISchemaWrapper;
- use OCP\DB\Types;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- class Version24000Date20220131153041 extends SimpleMigrationStep {
-
- public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
-
- $schema = $schemaClosure();
- $table = $schema->getTable('jobs');
- if (!$table->hasColumn('time_sensitive')) {
- $table->addColumn('time_sensitive', Types::SMALLINT, [
- 'default' => 1,
- ]);
- $table->addIndex(['time_sensitive'], 'jobs_time_sensitive');
- return $schema;
- }
- return null;
- }
- }
|