diff --git a/UPGRADE.md b/UPGRADE.md index 8846eb0..6e5043b 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade Notes +## 3.1.3 +- **[ENHANCEMENT]** Allow no auth_config for Google Index Worker [@dpfaffenbauer](https://github.com/dachcom-digital/pimcore-seo/pull/69) +- **[BUGFIX]** Fix Migration and Installer + ## 3.1.2 - **[BUGFIX]** Improve Migrations diff --git a/config/install/sql/install.sql b/config/install/sql/install.sql index 39b77b2..9efcbda 100644 --- a/config/install/sql/install.sql +++ b/config/install/sql/install.sql @@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `seo_element_meta_data` ( `data` longtext NOT NULL COMMENT '(DC2Type:array)', `release_type` varchar(255) default 'public' not null, PRIMARY KEY (`id`), - UNIQUE KEY `element_type_id_integrator` (`element_type`,`element_id`,`integrator`) + UNIQUE KEY `element_type_id_integrator` (`element_type`,`element_id`,`integrator`, `release_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `seo_queue_entry` ( diff --git a/src/Migrations/Version20240827080929.php b/src/Migrations/Version20240827080929.php new file mode 100644 index 0000000..12635c4 --- /dev/null +++ b/src/Migrations/Version20240827080929.php @@ -0,0 +1,30 @@ +getTable('seo_element_meta_data')->hasIndex('element_type_id_integrator')) { + return; + } + + $this->addSql('DROP INDEX element_type_id_integrator ON seo_element_meta_data;'); + $this->addSql('CREATE UNIQUE INDEX element_type_id_integrator ON seo_element_meta_data (element_type, element_id, integrator, release_type);'); + } + + public function down(Schema $schema): void + { + } +} diff --git a/src/Tool/Install.php b/src/Tool/Install.php index 85e5d9a..a3aa113 100644 --- a/src/Tool/Install.php +++ b/src/Tool/Install.php @@ -6,6 +6,7 @@ use Pimcore\Extension\Bundle\Installer\Exception\InstallationException; use Pimcore\Extension\Bundle\Installer\SettingsStoreAwareInstaller; use Pimcore\Model\User\Permission; +use SeoBundle\Migrations\Version20240827080929; use Symfony\Component\Serializer\Encoder\DecoderInterface; class Install extends SettingsStoreAwareInstaller @@ -36,6 +37,11 @@ public function install(): void parent::install(); } + public function getLastMigrationVersionClassName(): ?string + { + return Version20240827080929::class; + } + protected function installDbStructure(): void { $db = \Pimcore\Db::get();