diff --git a/lib/Migration/Version030702Date20200626072306.php b/lib/Migration/Version030702Date20200626072306.php new file mode 100644 index 0000000000..6832c73cd2 --- /dev/null +++ b/lib/Migration/Version030702Date20200626072306.php @@ -0,0 +1,97 @@ +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/Version2060Date20200302132145.php b/lib/Migration/Version2060Date20200302132145.php index 9869e5adb6..766dbb140b 100644 --- a/lib/Migration/Version2060Date20200302132145.php +++ b/lib/Migration/Version2060Date20200302132145.php @@ -9,7 +9,8 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; -class Version2060Date20200302132145 extends SimpleMigrationStep { +class Version2060Date20200302132145 extends SimpleMigrationStep +{ /** * @param IOutput $output @@ -17,7 +18,8 @@ class Version2060Date20200302132145 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) + { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure();