Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(migration): Add column if not exists
Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
solracsf authored and backportbot[bot] committed Aug 8, 2024
commit 4218e7f6e4fc2ef96d868460612d11f2084cfda8
10 changes: 6 additions & 4 deletions core/Migrations/Version13000Date20170718121200.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
$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');
}
Expand Down