diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-05-29 11:14:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 11:14:00 +0200 |
commit | 73ec68b1ffafb792265a3805833e5cd84c966aed (patch) | |
tree | 33c6040c050f85c537f8dbf5e91d8c281db092cd /app/DoctrineMigrations/Version20181128203230.php | |
parent | 2ba365c7c49556cd23b444dc3bb8d4a8cf08809d (diff) | |
parent | 2cbee36a0184786644470a84fdd8c720cfcac58e (diff) | |
download | wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.tar.gz wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.tar.zst wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.zip |
Merge pull request #3984 from wallabag/2.4
Merge 2.4 into master
Diffstat (limited to 'app/DoctrineMigrations/Version20181128203230.php')
-rw-r--r-- | app/DoctrineMigrations/Version20181128203230.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20181128203230.php b/app/DoctrineMigrations/Version20181128203230.php new file mode 100644 index 00000000..d1b09fc7 --- /dev/null +++ b/app/DoctrineMigrations/Version20181128203230.php | |||
@@ -0,0 +1,45 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Schema\Schema; | ||
6 | use Wallabag\CoreBundle\Doctrine\WallabagMigration; | ||
7 | |||
8 | /** | ||
9 | * Fix varchar field from vendor to work with utf8mb4. | ||
10 | */ | ||
11 | class Version20181128203230 extends WallabagMigration | ||
12 | { | ||
13 | /** | ||
14 | * @param Schema $schema | ||
15 | */ | ||
16 | public function up(Schema $schema) | ||
17 | { | ||
18 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.'); | ||
19 | |||
20 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL'); | ||
21 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(191)'); | ||
22 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(191) NOT NULL'); | ||
23 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(191)'); | ||
24 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL'); | ||
25 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(191)'); | ||
26 | $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(191)'); | ||
27 | $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(191)'); | ||
28 | $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)'); | ||
29 | } | ||
30 | |||
31 | public function down(Schema $schema) | ||
32 | { | ||
33 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.'); | ||
34 | |||
35 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL'); | ||
36 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(255)'); | ||
37 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(255) NOT NULL'); | ||
38 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(255)'); | ||
39 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL'); | ||
40 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(255)'); | ||
41 | $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(255)'); | ||
42 | $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(255)'); | ||
43 | $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(255)'); | ||
44 | } | ||
45 | } | ||