aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-08-07 20:09:51 +0200
committerGitHub <noreply@github.com>2024-08-07 20:09:51 +0200
commit3803e755af71610264e6a90b8b87b703815f8caf (patch)
treebfaa98d5997934de68047ce3ed68c5a7bd6f3179 /core
parenta46e0a74050bc057d26cb39d2c3b857663d41664 (diff)
downloadnextcloud-server-3803e755af71610264e6a90b8b87b703815f8caf.tar.gz
nextcloud-server-3803e755af71610264e6a90b8b87b703815f8caf.zip
fix(migration): Add column if not exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'core')
-rw-r--r--core/Migrations/Version13000Date20170718121200.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php
index 3985bdaeb57..819eb84f118 100644
--- a/core/Migrations/Version13000Date20170718121200.php
+++ b/core/Migrations/Version13000Date20170718121200.php
@@ -123,10 +123,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
$table->addIndex(['user_id', 'root_id', 'mount_point'], 'mounts_user_root_path_index', [], ['lengths' => [null, null, 128]]);
} else {
$table = $schema->getTable('mounts');
- $table->addColumn('mount_id', Types::BIGINT, [
- 'notnull' => false,
- 'length' => 20,
- ]);
+ if (!$table->hasColumn('mount_id')) {
+ $table->addColumn('mount_id', Types::BIGINT, [
+ 'notnull' => false,
+ 'length' => 20,
+ ]);
+ }
if (!$table->hasIndex('mounts_mount_id_index')) {
$table->addIndex(['mount_id'], 'mounts_mount_id_index');
}