| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | class Migration1536233060MediaFolderConfiguration extends MigrationStep |
||
| 9 | { |
||
| 10 | public function getCreationTimestamp(): int |
||
| 11 | { |
||
| 12 | return 1536233060; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function update(Connection $connection): void |
||
| 16 | { |
||
| 17 | $connection->exec(' |
||
| 18 | CREATE TABLE `media_folder_configuration` ( |
||
| 19 | `id` BINARY(16), |
||
| 20 | `create_thumbnails` TINYINT(1) DEFAULT 1, |
||
| 21 | `thumbnail_quality` INT(11) DEFAULT 80, |
||
| 22 | `media_thumbnail_sizes_ro` LONGBLOB NULL, |
||
| 23 | `keep_aspect_ratio` TINYINT(1) DEFAULT 1, |
||
| 24 | `custom_fields` JSON NULL, |
||
| 25 | `created_at` DATETIME(3) NOT NULL, |
||
| 26 | `updated_at` DATETIME(3) NULL, |
||
| 27 | PRIMARY KEY (`id`), |
||
| 28 | CONSTRAINT `json.media_folder_configuration.custom_fields` CHECK (JSON_VALID(`custom_fields`)) |
||
| 29 | ); |
||
| 30 | '); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function updateDestructive(Connection $connection): void |
||
| 34 | { |
||
| 35 | // no destructive changes |
||
| 38 |