diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-08-07 20:09:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-07 20:09:51 +0200 |
commit | 3803e755af71610264e6a90b8b87b703815f8caf (patch) | |
tree | bfaa98d5997934de68047ce3ed68c5a7bd6f3179 /core | |
parent | a46e0a74050bc057d26cb39d2c3b857663d41664 (diff) | |
download | nextcloud-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.php | 10 |
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'); } |