Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The first time you install this app, before using a cron job, you properly want

**Important**: To enable pre-generation of previews you must add **php /var/www/nextcloud/occ preview:pre-generate** to a system cron job that runs at times of your choosing.]]>
</description>
<version>5.12.0-dev.1</version>
<version>5.12.0-dev.2</version>
<licence>agpl</licence>
<author>Richard Steinmetz</author>
<namespace>PreviewGenerator</namespace>
Expand Down
38 changes: 38 additions & 0 deletions lib/Migration/Version051200Date20251109132659.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2025 Richard Steinmetz
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\PreviewGenerator\Migration;

use Closure;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
use Override;

class Version051200Date20251109132659 extends SimpleMigrationStep {
/**
* @param Closure(): ISchemaWrapper $schemaClosure
*/
#[Override]
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

$table = $schema->getTable('preview_generation');
$idColumn = $table->getColumn('id');
$bigintType = Type::getType(Types::BIGINT);
if ($idColumn->getType() !== $bigintType) {
$idColumn->setType($bigintType);
}

return $schema;
}
}
Loading