$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');
}