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:
parent
2aa18b7b90
commit
a94d7503c2
14 changed files with 100 additions and 2 deletions
30
app/DoctrineMigrations/Version20230613121354.php
Normal file
30
app/DoctrineMigrations/Version20230613121354.php
Normal 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');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue