Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-11-12 15:04:48 +0300
committerJulius Härtl <jus@bitgrid.net>2020-11-13 17:31:57 +0300
commitead5920cfc12b7063e64645b92bc9d2e6c4c5ec2 (patch)
tree763e89d7b5d8d6bc9744ed330e3a2128528889d6 /lib
parent22a29a06cc5ed8f3c7501903c61998af286e0580 (diff)
Add migration to bigint columns
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Migration/Version2060Date20200302131958.php28
-rw-r--r--lib/Migration/Version2060Date20200302132145.php10
-rw-r--r--lib/Migration/Version30704Date20200626072306.php2
3 files changed, 21 insertions, 19 deletions
diff --git a/lib/Migration/Version2060Date20200302131958.php b/lib/Migration/Version2060Date20200302131958.php
index 567a7f2b..29f90bbd 100644
--- a/lib/Migration/Version2060Date20200302131958.php
+++ b/lib/Migration/Version2060Date20200302131958.php
@@ -26,7 +26,7 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
if (!$schema->hasTable('richdocuments_wopi')) {
$table = $schema->createTable('richdocuments_wopi');
- $table->addColumn('id', 'integer', [
+ $table->addColumn('id', 'bigint', [
'autoincrement' => true,
'notnull' => true,
'length' => 20,
@@ -44,11 +44,11 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
'notnull' => false,
'length' => 64,
]);
- $table->addColumn('fileid', 'integer', [
+ $table->addColumn('fileid', 'bigint', [
'notnull' => true,
'length' => 20,
]);
- $table->addColumn('version', 'integer', [
+ $table->addColumn('version', 'bigint', [
//'notnull' => true,
'notnull' => false,
'length' => 20,
@@ -69,16 +69,16 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
'length' => 32,
'default' => '',
]);
- $table->addColumn('expiry', 'integer', [
+ $table->addColumn('expiry', 'bigint', [
'notnull' => false,
'length' => 20,
'unsigned' => true,
]);
- $table->addColumn('template_destination', 'integer', [
+ $table->addColumn('template_destination', 'bigint', [
'notnull' => false,
'length' => 20,
]);
- $table->addColumn('template_id', 'integer', [
+ $table->addColumn('template_id', 'bigint', [
'notnull' => false,
'length' => 20,
]);
@@ -114,7 +114,7 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
if (!$schema->hasTable('richdocuments_direct')) {
$table = $schema->createTable('richdocuments_direct');
- $table->addColumn('id', 'integer', [
+ $table->addColumn('id', 'bigint', [
'autoincrement' => true,
'notnull' => true,
'length' => 20,
@@ -128,22 +128,22 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
'notnull' => false,
'length' => 64,
]);
- $table->addColumn('fileid', 'integer', [
+ $table->addColumn('fileid', 'bigint', [
'notnull' => true,
'length' => 20,
]);
- $table->addColumn('timestamp', 'integer', [
+ $table->addColumn('timestamp', 'bigint', [
// 'notnull' => true,
'notnull' => false,
'length' => 20,
'default' => 0,
'unsigned' => true,
]);
- $table->addColumn('template_destination', 'integer', [
+ $table->addColumn('template_destination', 'bigint', [
'notnull' => false,
'length' => 20,
]);
- $table->addColumn('template_id', 'integer', [
+ $table->addColumn('template_id', 'bigint', [
'notnull' => false,
'length' => 20,
]);
@@ -154,7 +154,7 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
if (!$schema->hasTable('richdocuments_assets')) {
$table = $schema->createTable('richdocuments_assets');
- $table->addColumn('id', 'integer', [
+ $table->addColumn('id', 'bigint', [
'autoincrement' => true,
'notnull' => true,
'length' => 20,
@@ -164,7 +164,7 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
'notnull' => false,
'length' => 64,
]);
- $table->addColumn('fileid', 'integer', [
+ $table->addColumn('fileid', 'bigint', [
'notnull' => true,
'length' => 20,
]);
@@ -172,7 +172,7 @@ class Version2060Date20200302131958 extends SimpleMigrationStep {
'notnull' => false,
'length' => 64,
]);
- $table->addColumn('timestamp', 'integer', [
+ $table->addColumn('timestamp', 'bigint', [
// 'notnull' => true,
'notnull' => false,
'length' => 20,
diff --git a/lib/Migration/Version2060Date20200302132145.php b/lib/Migration/Version2060Date20200302132145.php
index 766dbb14..6663eb63 100644
--- a/lib/Migration/Version2060Date20200302132145.php
+++ b/lib/Migration/Version2060Date20200302132145.php
@@ -24,10 +24,12 @@ class Version2060Date20200302132145 extends SimpleMigrationStep
$schema = $schemaClosure();
$table = $schema->getTable('richdocuments_wopi');
- $table->addColumn('share', 'string', [
- 'notnull' => false,
- 'length' => 64
- ]);
+ if (!$table->hasColumn('share')) {
+ $table->addColumn('share', 'string', [
+ 'notnull' => false,
+ 'length' => 64
+ ]);
+ }
return $schema;
}
diff --git a/lib/Migration/Version30704Date20200626072306.php b/lib/Migration/Version30704Date20200626072306.php
index bb9efa40..5219cf9f 100644
--- a/lib/Migration/Version30704Date20200626072306.php
+++ b/lib/Migration/Version30704Date20200626072306.php
@@ -24,7 +24,7 @@ class Version30704Date20200626072306 extends SimpleMigrationStep {
$table = $schema->getTable('richdocuments_wopi');
if (!$table->hasColumn('template_id')) {
- $table->addColumn('template_id', 'integer', [
+ $table->addColumn('template_id', 'bigint', [
'notnull' => false,
'length' => 20,
]);