summaryrefslogtreecommitdiffstats
path: root/core/Migrations/Version18000Date20191014105105.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-11-25 14:09:38 +0100
committerJulius Härtl <jus@bitgrid.net>2019-11-27 19:56:40 +0100
commit9a2694fcb0093afee13d0cd91de15b34b747cc62 (patch)
treee8a448a61ed62ee47cd997c0d3a4065f472c100d /core/Migrations/Version18000Date20191014105105.php
parentbc36cc808fb9ed9ff22c42246fe68f06cedb902e (diff)
downloadnextcloud-server-9a2694fcb0093afee13d0cd91de15b34b747cc62.tar.gz
nextcloud-server-9a2694fcb0093afee13d0cd91de15b34b747cc62.zip
Code style fixes and cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/Migrations/Version18000Date20191014105105.php')
-rw-r--r--core/Migrations/Version18000Date20191014105105.php70
1 files changed, 34 insertions, 36 deletions
diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php
index b291c0b5e46..634f9f91faf 100644
--- a/core/Migrations/Version18000Date20191014105105.php
+++ b/core/Migrations/Version18000Date20191014105105.php
@@ -50,44 +50,42 @@ class Version18000Date20191014105105 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
- if (!$schema->hasTable('direct_edit')) {
- $table = $schema->createTable('direct_edit');
+ $table = $schema->createTable('direct_edit');
- $table->addColumn('id', Type::BIGINT, [
- 'autoincrement' => true,
- 'notnull' => true,
- ]);
- $table->addColumn('editor_id', Type::STRING, [
- 'notnull' => true,
- 'length' => 64,
- ]);
- $table->addColumn('token', Type::STRING, [
- 'notnull' => true,
- 'length' => 64,
- ]);
- $table->addColumn('file_id', Type::BIGINT, [
- 'notnull' => true,
- ]);
- $table->addColumn('user_id', Type::STRING, [
- 'notnull' => false,
- 'length' => 64,
- ]);
- $table->addColumn('share_id', Type::BIGINT, [
- 'notnull' => false
- ]);
- $table->addColumn('timestamp', Type::BIGINT, [
- 'notnull' => true,
- 'length' => 20,
- 'unsigned' => true,
- ]);
- $table->addColumn('accessed', Type::BOOLEAN, [
- 'notnull' => true,
- 'default' => false
- ]);
+ $table->addColumn('id', Type::BIGINT, [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ ]);
+ $table->addColumn('editor_id', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 64,
+ ]);
+ $table->addColumn('token', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 64,
+ ]);
+ $table->addColumn('file_id', Type::BIGINT, [
+ 'notnull' => true,
+ ]);
+ $table->addColumn('user_id', Type::STRING, [
+ 'notnull' => false,
+ 'length' => 64,
+ ]);
+ $table->addColumn('share_id', Type::BIGINT, [
+ 'notnull' => false
+ ]);
+ $table->addColumn('timestamp', Type::BIGINT, [
+ 'notnull' => true,
+ 'length' => 20,
+ 'unsigned' => true,
+ ]);
+ $table->addColumn('accessed', Type::BOOLEAN, [
+ 'notnull' => true,
+ 'default' => false
+ ]);
- $table->setPrimaryKey(['id']);
- $table->addIndex(['token']);
- }
+ $table->setPrimaryKey(['id']);
+ $table->addIndex(['token']);
return $schema;
}