From 44405f6d918f6dbfc7cce5d1279bcdd714d1f3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 3 Sep 2020 17:11:47 +0200 Subject: Rename migration and cleanup unused methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Migration/Version030702Date20200626072306.php | 97 ----------------------- lib/Migration/Version30704Date20200626072306.php | 78 ++++++++++++++++++ 2 files changed, 78 insertions(+), 97 deletions(-) delete mode 100644 lib/Migration/Version030702Date20200626072306.php create mode 100644 lib/Migration/Version30704Date20200626072306.php (limited to 'lib') diff --git a/lib/Migration/Version030702Date20200626072306.php b/lib/Migration/Version030702Date20200626072306.php deleted file mode 100644 index 6832c73c..00000000 --- a/lib/Migration/Version030702Date20200626072306.php +++ /dev/null @@ -1,97 +0,0 @@ -getTable('richdocuments_wopi'); - - if (!$table->hasColumn('template_id')) { - $table->addColumn('template_id', 'integer', [ - 'notnull' => false, - 'length' => 4, - ]); - } - - if (!$table->hasColumn('hide_download')) { - $table->addColumn('hide_download', 'boolean', [ - 'notnull' => true, - 'default' => false, - ]); - } - - if (!$table->hasColumn('share')) { - $table->addColumn('share', 'string', [ - 'notnull' => false, - 'length' => 64 - ]); - } - - if (!$table->hasColumn('direct')) { - $table->addColumn('direct', 'boolean', [ - 'notnull' => true, - 'default' => false, - ]); - } - if (!$table->hasColumn('is_remote_token')) { - $table->addColumn('is_remote_token', 'boolean', [ - 'notnull' => true, - 'default' => false, - ]); - } - - if (!$table->hasColumn('remote_server')) { - $table->addColumn('remote_server', 'string', [ - 'notnull' => true, - 'default' => '', - ]); - - } - if (!$table->hasColumn('remote_server_token')) { - $table->addColumn('remote_server_token', 'string', [ - 'notnull' => true, - 'length' => 32, - 'default' => '', - ]); - } - - - 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) { - } -} diff --git a/lib/Migration/Version30704Date20200626072306.php b/lib/Migration/Version30704Date20200626072306.php new file mode 100644 index 00000000..5094f3f4 --- /dev/null +++ b/lib/Migration/Version30704Date20200626072306.php @@ -0,0 +1,78 @@ +getTable('richdocuments_wopi'); + + if (!$table->hasColumn('template_id')) { + $table->addColumn('template_id', 'integer', [ + 'notnull' => false, + 'length' => 4, + ]); + } + + if (!$table->hasColumn('hide_download')) { + $table->addColumn('hide_download', 'boolean', [ + 'notnull' => true, + 'default' => false, + ]); + } + + if (!$table->hasColumn('share')) { + $table->addColumn('share', 'string', [ + 'notnull' => false, + 'length' => 64 + ]); + } + + if (!$table->hasColumn('direct')) { + $table->addColumn('direct', 'boolean', [ + 'notnull' => true, + 'default' => false, + ]); + } + if (!$table->hasColumn('is_remote_token')) { + $table->addColumn('is_remote_token', 'boolean', [ + 'notnull' => true, + 'default' => false, + ]); + } + + if (!$table->hasColumn('remote_server')) { + $table->addColumn('remote_server', 'string', [ + 'notnull' => true, + 'default' => '', + ]); + + } + if (!$table->hasColumn('remote_server_token')) { + $table->addColumn('remote_server_token', 'string', [ + 'notnull' => true, + 'length' => 32, + 'default' => '', + ]); + } + + + return $schema; + } +} -- cgit v1.2.3