1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Added new setting to show / hide articles thumbnails

This commit is contained in:
Nicolas Lœuillet 2023-06-13 15:02:48 +02:00 committed by Simounet
parent 2aa18b7b90
commit a94d7503c2
No known key found for this signature in database
GPG key ID: 77D3B7DC794EB770
14 changed files with 100 additions and 2 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/**
* Added a new setting to display or not thumbnails
*/
final class Version20230613121354 extends WallabagMigration
{
public function up(Schema $schema): void
{
$configTable = $schema->getTable($this->getTable('config'));
$this->skipIf($configTable->hasColumn('display_thumbnails'), 'It seems that you already played this migration.');
$configTable->addColumn('display_thumbnails', 'integer', [
'default' => 1,
'notnull' => false,
]);
}
public function down(Schema $schema): void
{
$configTable = $schema->getTable($this->getTable('config'));
$configTable->dropColumn('display_thumbnails');
}
}