aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20190806130304.php
blob: 27d3ddadc757d7b46af0a8f73d5d2d3f7862efa7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php declare(strict_types=1);

namespace Application\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20190806130304 extends AbstractMigration
{
    public function up(Schema $schema) : void
    {
        $this->addSql('ALTER TABLE wallabag_entry CHANGE language language VARCHAR(20) DEFAULT NULL');
        $this->addSql('CREATE INDEX user_language ON wallabag_entry (language, user_id)');
    }

    public function down(Schema $schema) : void
    {
        $this->addSql('DROP INDEX user_language ON `wallabag_entry`');
        $this->addSql('ALTER TABLE `wallabag_entry` CHANGE language language LONGTEXT DEFAULT NULL COLLATE utf8mb4_unicode_ci');
    }
}