nextcloud-notes/lib/Migration/Version3005Date202005282044...

47 lines
1.1 KiB
PHP
Raw Normal View History

2020-07-13 08:27:52 +02:00
<?php
declare(strict_types=1);
2020-05-23 14:12:04 +02:00
namespace OCA\Notes\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version3005Date20200528204430 extends SimpleMigrationStep {
2020-05-23 14:12:04 +02:00
/**
* @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();
if ($schema->hasTable('notes_meta')) {
$schema->dropTable('notes_meta');
2020-05-23 14:12:04 +02:00
}
2020-05-23 14:12:04 +02:00
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) {
}
}