]>
Commit | Line | Data |
---|---|---|
9717d012 NL |
1 | <?php |
2 | ||
3 | declare(strict_types=1); | |
4 | ||
5 | namespace Application\Migrations; | |
6 | ||
7 | use Doctrine\DBAL\Schema\Schema; | |
8 | use Wallabag\CoreBundle\Doctrine\WallabagMigration; | |
9 | ||
10 | /** | |
11 | * Renamed Piwik to Matomo in configuration. | |
12 | */ | |
13 | final class Version20200428072628 extends WallabagMigration | |
14 | { | |
15 | public function up(Schema $schema): void | |
16 | { | |
17 | $this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_enabled' where name = 'piwik_enabled';"); | |
18 | $this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_host' where name = 'piwik_host';"); | |
19 | $this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_site_id' where name = 'piwik_site_id';"); | |
20 | } | |
21 | ||
22 | public function down(Schema $schema): void | |
23 | { | |
24 | $this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_enabled' where name = 'matomo_enabled';"); | |
25 | $this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_host' where name = 'matomo_host';"); | |
26 | $this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_site_id' where name = 'matomo_site_id';"); | |
27 | } | |
28 | } |