aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2019-06-06 12:03:37 +0200
committerGitHub <noreply@github.com>2019-06-06 12:03:37 +0200
commitc19845a7ae5fe7c1ff22fd560c48e4af8b9da15a (patch)
tree22a576e9c4329851d965b78581d7258d3fe400c9 /app
parent2b04b300f83cd4bb288c1fd00e2b77ec4f557a00 (diff)
parentfeb239ea1006685ab3862c988309a1a5a9659559 (diff)
downloadwallabag-c19845a7ae5fe7c1ff22fd560c48e4af8b9da15a.tar.gz
wallabag-c19845a7ae5fe7c1ff22fd560c48e4af8b9da15a.tar.zst
wallabag-c19845a7ae5fe7c1ff22fd560c48e4af8b9da15a.zip
Merge pull request #3959 from wallabag/mig-tag-collation
mysql: change collation of tag label
Diffstat (limited to 'app')
-rw-r--r--app/DoctrineMigrations/Version20190511165128.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20190511165128.php b/app/DoctrineMigrations/Version20190511165128.php
new file mode 100644
index 00000000..7b6b1bec
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190511165128.php
@@ -0,0 +1,30 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Application\Migrations;
6
7use Doctrine\DBAL\Schema\Schema;
8use Wallabag\CoreBundle\Doctrine\WallabagMigration;
9
10/**
11 * Convert tab label to utf8mb4_bin (MySQL only).
12 */
13final class Version20190511165128 extends WallabagMigration
14{
15 public function up(Schema $schema): void
16 {
17 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
18
19 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
20 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
21 }
22
23 public function down(Schema $schema): void
24 {
25 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
26
27 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
28 $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
29 }
30}