| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 13 | #[Package('core')] |
||
| 14 | class Migration1689084023AdminElasticsearchIndexTask extends MigrationStep |
||
| 15 | { |
||
| 16 | public function getCreationTimestamp(): int |
||
| 17 | { |
||
| 18 | return 1689084023; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function update(Connection $connection): void |
||
| 22 | { |
||
| 23 | if (EntityDefinitionQueryHelper::tableExists($connection, 'admin_elasticsearch_index_task')) { |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | $connection->executeStatement(' |
||
| 28 | CREATE TABLE IF NOT EXISTS `admin_elasticsearch_index_task` ( |
||
| 29 | `id` binary(16) NOT NULL, |
||
| 30 | `index` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL, |
||
| 31 | `alias` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL, |
||
| 32 | `entity` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL, |
||
| 33 | `doc_count` int(11) NOT NULL, |
||
| 34 | PRIMARY KEY (`id`) |
||
| 35 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci |
||
| 36 | '); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function updateDestructive(Connection $connection): void |
||
| 41 | } |
||
| 42 | } |
||
| 43 |