File tree Expand file tree Collapse file tree 2 files changed +48
-3
lines changed Expand file tree Collapse file tree 2 files changed +48
-3
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ /**
6+ * Pimcore
7+ *
8+ * This source file is available under two different licenses:
9+ * - GNU General Public License version 3 (GPLv3)
10+ * - Pimcore Commercial License (PCL)
11+ * Full copyright and license information is available in
12+ * LICENSE.md which is distributed with this source code.
13+ *
14+ * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
15+ * @license http://www.pimcore.org/license GPLv3 and PCL
16+ */
17+
18+ namespace OutputDataConfigToolkitBundle \Migrations ;
19+
20+ use Doctrine \DBAL \Schema \Schema ;
21+ use Doctrine \Migrations \AbstractMigration ;
22+
23+ final class Version20240823111615 extends AbstractMigration
24+ {
25+ public function getDescription (): string
26+ {
27+ return 'Migrate bundle_outputdataconfigtoolkit_outputdefinition table columns ' ;
28+ }
29+
30+ public function up (Schema $ schema ): void
31+ {
32+ $ query = "ALTER TABLE `bundle_outputdataconfigtoolkit_outputdefinition` CHANGE COLUMN `configuration` `configuration` LONGTEXT
33+ CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NULL DEFAULT NULL; " ;
34+
35+ $ this ->addSql ($ query );
36+ }
37+
38+ public function down (Schema $ schema ): void
39+ {
40+ $ query = "ALTER TABLE `bundle_outputdataconfigtoolkit_outputdefinition` CHANGE COLUMN `configuration` `configuration` LONGTEXT
41+ CHARACTER SET 'latin1' NULL DEFAULT NULL; " ;
42+
43+ $ this ->addSql ($ query );
44+ }
45+ }
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ public function install(): void
3636 `id` int(11) NOT NULL AUTO_INCREMENT,
3737 `objectId` int(11) NOT NULL,
3838 `classId` varchar(50) NOT NULL,
39- `channel` varchar(255) COLLATE utf8_bin NOT NULL,
40- `configuration` longtext CHARACTER SET latin1 ,
39+ `channel` varchar(255) NOT NULL,
40+ `configuration` longtext,
4141 PRIMARY KEY (`id`),
4242 UNIQUE KEY `Unique` (`objectId`,`classId`,`channel`)
4343 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@@ -78,7 +78,7 @@ public function uninstall(): void
7878 $ db ->executeQuery ('DROP TABLE IF EXISTS ` ' . Dao::TABLE_NAME . '`; ' );
7979
8080 $ db ->executeQuery ("DELETE FROM users_permission_definitions WHERE `key` = 'bundle_outputDataConfigToolkit' " );
81- if (self :: isInstalled ()) {
81+ if ($ this -> isInstalled ()) {
8282 throw new InstallationException ('Could not be uninstalled. ' );
8383 }
8484 }
You can’t perform that action at this time.
0 commit comments