From bf00edd89a2736909976152ab5c0268a24157ec1 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 11 Jul 2017 00:11:51 +0300 Subject: [PATCH] Alter some critical fields to BigInt --- .../Migrations/Version20170711193427.php | 32 +++++++++++++++++++ .../federatedfilesharing/appinfo/database.xml | 4 +-- apps/files_sharing/appinfo/database.xml | 4 +-- apps/files_trashbin/appinfo/database.xml | 2 +- core/Migrations/Version20170711191432.php | 26 +++++++++++++++ db_structure.xml | 7 ++-- 6 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 apps/dav/appinfo/Migrations/Version20170711193427.php create mode 100644 core/Migrations/Version20170711191432.php diff --git a/apps/dav/appinfo/Migrations/Version20170711193427.php b/apps/dav/appinfo/Migrations/Version20170711193427.php new file mode 100644 index 000000000000..4ecfee1becd8 --- /dev/null +++ b/apps/dav/appinfo/Migrations/Version20170711193427.php @@ -0,0 +1,32 @@ +hasTable("${prefix}properties")) { + $table = $schema->getTable("{$prefix}properties"); + + $idColumn = $table->getColumn('id'); + if ($idColumn){ + $idColumn->setType(Type::getType(Type::BIGINT)); + $idColumn->setOptions(['length' => 20]); + } + + $fileidColumn = $table->getColumn('fileid'); + if ($fileidColumn){ + $fileidColumn->setType(Type::getType(Type::BIGINT)); + $fileidColumn->setOptions(['length' => 20]); + } + } + } +} diff --git a/apps/federatedfilesharing/appinfo/database.xml b/apps/federatedfilesharing/appinfo/database.xml index 1dbe8ee2ec90..c32d0d989733 100644 --- a/apps/federatedfilesharing/appinfo/database.xml +++ b/apps/federatedfilesharing/appinfo/database.xml @@ -19,13 +19,13 @@ the servers (e.g. permissions change, unshare,...) share_id integer true - 4 + 10 remote_id integer true - 4 + 10 share ID at the remote server diff --git a/apps/files_sharing/appinfo/database.xml b/apps/files_sharing/appinfo/database.xml index a70be408da4f..67cffe3705c4 100644 --- a/apps/files_sharing/appinfo/database.xml +++ b/apps/files_sharing/appinfo/database.xml @@ -13,7 +13,7 @@ 0 true 1 - 4 + 10 remote @@ -27,7 +27,7 @@ integer -1 true - 4 + 10 share_token diff --git a/apps/files_trashbin/appinfo/database.xml b/apps/files_trashbin/appinfo/database.xml index 2944a31b02d0..f13f6342545b 100644 --- a/apps/files_trashbin/appinfo/database.xml +++ b/apps/files_trashbin/appinfo/database.xml @@ -19,7 +19,7 @@ 0 true 1 - 4 + 10 diff --git a/core/Migrations/Version20170711191432.php b/core/Migrations/Version20170711191432.php new file mode 100644 index 000000000000..5ab681cd9d7c --- /dev/null +++ b/core/Migrations/Version20170711191432.php @@ -0,0 +1,26 @@ +hasTable("${prefix}share")) { + $table = $schema->getTable("{$prefix}share"); + + $fileSourceColumn = $table->getColumn('file_source'); + if ($fileSourceColumn){ + $fileSourceColumn->setType(Type::getType(Type::BIGINT)); + $fileSourceColumn->setOptions(['length' => 20]); + } + } + } +} diff --git a/db_structure.xml b/db_structure.xml index 2c35985e760d..3043561f040b 100644 --- a/db_structure.xml +++ b/db_structure.xml @@ -153,6 +153,7 @@ root_id integer + 10 true @@ -278,7 +279,7 @@ 0 true 1 - 4 + 10 @@ -312,7 +313,7 @@ integer true - 4 + 10 @@ -984,7 +985,7 @@ 0 true true - 4 + 10