Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | class Migration1536232740SnippetSet extends MigrationStep |
||
9 | { |
||
10 | public function getCreationTimestamp(): int |
||
11 | { |
||
12 | return 1536232740; |
||
13 | } |
||
14 | |||
15 | public function update(Connection $connection): void |
||
16 | { |
||
17 | $connection->executeQuery(' |
||
18 | CREATE TABLE IF NOT EXISTS `snippet_set` ( |
||
19 | `id` BINARY(16) NOT NULL, |
||
20 | `name` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
||
21 | `base_file` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
||
22 | `iso` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
||
23 | `custom_fields` JSON NULL, |
||
24 | `created_at` DATETIME(3) NOT NULL, |
||
25 | `updated_at` DATETIME(3) NULL, |
||
26 | PRIMARY KEY (`id`), |
||
27 | CONSTRAINT `json.snippet_set.custom_fields` CHECK (JSON_VALID(`custom_fields`)) |
||
28 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
||
29 | '); |
||
30 | } |
||
31 | |||
32 | public function updateDestructive(Connection $connection): void |
||
33 | { |
||
34 | // nth |
||
37 |