wallabag/migrations/Version20230728085538.php

27 lines
906 B
PHP
Raw Permalink Normal View History

2023-07-28 09:04:16 +00:00
<?php
declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
2024-02-19 00:30:12 +00:00
use Wallabag\Doctrine\WallabagMigration;
2023-07-28 09:04:16 +00:00
/**
* Remove demonstration mode settings.
*/
final class Version20230728085538 extends WallabagMigration
{
public function up(Schema $schema): void
{
$this->addSql('DELETE FROM' . $this->getTable('internal_setting') . " WHERE name = 'demo_mode_enabled';");
$this->addSql('DELETE FROM' . $this->getTable('internal_setting') . " WHERE name = 'demo_mode_username';");
}
public function down(Schema $schema): void
{
$this->addSql('INSERT INTO ' . $this->getTable('internal_setting') . " (name, value, section) VALUES ('demo_mode_enabled', '0', 'misc');");
$this->addSql('INSERT INTO ' . $this->getTable('internal_setting') . " (name, value, section) VALUES ('demo_mode_username', 'wallabag', 'misc');");
}
}