Files
deck/lib/Migration/Version1000Date20200308073933.php
Julius Härtl 3c6a177da9 Add backend for assigning groups to cards
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-01 20:52:09 +02:00

55 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\Deck\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
/**
* Auto-generated migration step: Please modify to your needs!
*/
class Version1000Date20200308073933 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('deck_assigned_users');
// Defaults to TYPE_USER = 0
$table->addColumn('type', 'integer', [
'notnull' => true,
'default' => 0
]);
$table->addIndex(['participant'], 'deck_assigned_users_idx_t');
return $schema;
}
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
}