nextcloud-gpodder/lib/Migration/Version0005Date202110041109...

28 lines
698 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace OCA\GPodderSync\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version0005Date20211004110900 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('gpodder_episode_action');
$table->changeColumn('timestamp', ['notnull' => false]);
$table->addColumn('timestamp_epoch', Types::INTEGER, [
'notnull' => false,
'default' => 0,
'unsigned' => true,
]);
return $schema;
}
}