@@ 9-26 (lines=18) @@ | ||
6 | use Doctrine\DBAL\Types\StringType; |
|
7 | use Doctrine\Migrations\AbstractMigration; |
|
8 | ||
9 | class Version20150421173032 extends AbstractMigration |
|
10 | { |
|
11 | public function getDescription() : string |
|
12 | { |
|
13 | return ''; |
|
14 | } |
|
15 | ||
16 | public function up(Schema $schema) : void |
|
17 | { |
|
18 | $this->addSql('ALTER TABLE `performances` CHANGE `description` `description` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL'); |
|
19 | $this->addSql('ALTER TABLE `employees` CHANGE `biography` `biography` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL'); |
|
20 | $this->addSql('ALTER TABLE `roles` CHANGE `description` `description` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL'); |
|
21 | } |
|
22 | ||
23 | public function down(Schema $schema) : void |
|
24 | { |
|
25 | } |
|
26 | } |
|
27 |
@@ 10-53 (lines=44) @@ | ||
7 | use Doctrine\DBAL\Schema\Schema; |
|
8 | use Doctrine\Migrations\AbstractMigration; |
|
9 | ||
10 | final class Version20210108170343 extends AbstractMigration |
|
11 | { |
|
12 | public function getDescription() : string |
|
13 | { |
|
14 | return 'Added audience field to performance'; |
|
15 | } |
|
16 | ||
17 | public function up(Schema $schema) : void |
|
18 | { |
|
19 | $this->addSql(' |
|
20 | ALTER TABLE performances |
|
21 | ADD audience ENUM(\'adults\', \'kids\') DEFAULT \'adults\' NOT NULL COMMENT \'(DC2Type:AudienceEnum)\' |
|
22 | '); |
|
23 | ||
24 | $this->addSql(' |
|
25 | UPDATE performances |
|
26 | SET `audience` = \'kids\' |
|
27 | WHERE `slug` IN ( |
|
28 | \'popieliushka\', |
|
29 | \'zolotie-kurcha\', |
|
30 | \'dorogha-do-sontsia\', |
|
31 | \'aladdin\', |
|
32 | \'korol-drozdoborod\', |
|
33 | \'kit-u-chobotiakh-1\', |
|
34 | \'troie-porosiat-1\', |
|
35 | \'vsi-mishi-liubliat-sir\', |
|
36 | \'vizok-chudies\', |
|
37 | \'siroyizhka\', |
|
38 | \'koza-dierieza\', |
|
39 | \'korolieva-zagublienikh-g-udzikiv\', |
|
40 | \'kotik-pivnik-i-lisichka\', |
|
41 | \'snigova-korolieva\', |
|
42 | \'rizdvianie-viertiepnie-diistvo\', |
|
43 | \'prigodi-v-krayini-svitloforiyi\', |
|
44 | \'barvinok-ghieroi\' |
|
45 | ) |
|
46 | '); |
|
47 | } |
|
48 | ||
49 | public function down(Schema $schema) : void |
|
50 | { |
|
51 | $this->addSql('ALTER TABLE performances DROP audience'); |
|
52 | } |
|
53 | } |
|
54 |