aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-10-29 14:41:40 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-10-29 14:41:40 +0100
commita523f1c1ba6c67a2a1005f70db0d57fc6482c7d5 (patch)
treedb5d4dae87bb14be8637bf0ec7dc0d2fe357d276
parent48c802da124ccb44f9602ae05af3bf1d2082a8d0 (diff)
downloadwallabag-a523f1c1ba6c67a2a1005f70db0d57fc6482c7d5.tar.gz
wallabag-a523f1c1ba6c67a2a1005f70db0d57fc6482c7d5.tar.zst
wallabag-a523f1c1ba6c67a2a1005f70db0d57fc6482c7d5.zip
fixup! Debug MySQL failingdropping-php5
-rw-r--r--app/DoctrineMigrations/Version20181029131313.php10
-rw-r--r--app/config/config.yml3
-rw-r--r--src/Wallabag/CoreBundle/Entity/InternalSetting.php36
3 files changed, 3 insertions, 46 deletions
diff --git a/app/DoctrineMigrations/Version20181029131313.php b/app/DoctrineMigrations/Version20181029131313.php
index 328dc80e..47b2f3f4 100644
--- a/app/DoctrineMigrations/Version20181029131313.php
+++ b/app/DoctrineMigrations/Version20181029131313.php
@@ -14,20 +14,16 @@ final class Version20181029131313 extends WallabagMigration
14{ 14{
15 public function up(Schema $schema): void 15 public function up(Schema $schema): void
16 { 16 {
17 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting') . ';');
18
19 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) { 17 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) {
20 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 18 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
21 19
22 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' CHANGE `name` `name` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 20 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
23 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' CHANGE `section` `section` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 21 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
24 } 22 }
25 } 23 }
26 24
27 public function down(Schema $schema): void 25 public function down(Schema $schema): void
28 { 26 {
29 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting') . ';');
30
31 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) { 27 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) {
32 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); 28 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
33 29
diff --git a/app/config/config.yml b/app/config/config.yml
index b2ab0092..092f3ec0 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -365,6 +365,3 @@ jms_serializer:
365sensio_framework_extra: 365sensio_framework_extra:
366 router: 366 router:
367 annotations: false 367 annotations: false
368
369craue_config:
370 entity_name: Wallabag\CoreBundle\Entity\InternalSetting
diff --git a/src/Wallabag/CoreBundle/Entity/InternalSetting.php b/src/Wallabag/CoreBundle/Entity/InternalSetting.php
deleted file mode 100644
index 419a2778..00000000
--- a/src/Wallabag/CoreBundle/Entity/InternalSetting.php
+++ /dev/null
@@ -1,36 +0,0 @@
1<?php
2
3namespace Wallabag\CoreBundle\Entity;
4
5use Craue\ConfigBundle\Entity\BaseSetting;
6use Doctrine\ORM\Mapping as ORM;
7
8/**
9 * Internal Setting.
10 *
11 * @ORM\Entity(repositoryClass="Craue\ConfigBundle\Repository\SettingRepository")
12 * @ORM\Table(name="internal_setting")
13 * @ORM\AttributeOverrides({
14 * @ORM\AttributeOverride(name="name",
15 * column=@ORM\Column(
16 * name = "name",
17 * length = 191
18 * )
19 * ),
20 * @ORM\AttributeOverride(name="section",
21 * column=@ORM\Column(
22 * name = "section",
23 * length = 191
24 * )
25 * )
26 * })
27 */
28class InternalSetting extends BaseSetting
29{
30 /**
31 * @var string|null
32 *
33 * @ORM\Column(name="value", type="string", nullable=true, length=191)
34 */
35 protected $value;
36}