|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace DoctrineMigrations; |
| 6 | + |
| 7 | +use Doctrine\DBAL\Schema\Schema; |
| 8 | +use Doctrine\Migrations\AbstractMigration; |
| 9 | + |
| 10 | +/** |
| 11 | + * Auto-generated Migration: Please modify to your needs! |
| 12 | + */ |
| 13 | +final class Version20240221142818 extends AbstractMigration |
| 14 | +{ |
| 15 | + public function getDescription(): string |
| 16 | + { |
| 17 | + return ''; |
| 18 | + } |
| 19 | + |
| 20 | + public function up(Schema $schema): void |
| 21 | + { |
| 22 | + // this up() migration is auto-generated, please modify it to your needs |
| 23 | + $this->addSql('DROP INDEX relations_modified_at_idx ON feed'); |
| 24 | + $this->addSql('DROP INDEX modified_at_idx ON feed'); |
| 25 | + $this->addSql('ALTER TABLE feed ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 26 | + $this->addSql('CREATE INDEX changed_idx ON feed (changed)'); |
| 27 | + $this->addSql('ALTER TABLE feed_source ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, ADD relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 28 | + $this->addSql('CREATE INDEX changed_idx ON feed_source (changed)'); |
| 29 | + $this->addSql('ALTER TABLE media ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, ADD relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 30 | + $this->addSql('CREATE INDEX changed_idx ON media (changed)'); |
| 31 | + $this->addSql('DROP INDEX modified_at_idx ON playlist'); |
| 32 | + $this->addSql('DROP INDEX relations_modified_at_idx ON playlist'); |
| 33 | + $this->addSql('ALTER TABLE playlist ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 34 | + $this->addSql('CREATE INDEX changed_idx ON playlist (changed)'); |
| 35 | + $this->addSql('DROP INDEX relations_modified_at_idx ON playlist_screen_region'); |
| 36 | + $this->addSql('DROP INDEX modified_at_idx ON playlist_screen_region'); |
| 37 | + $this->addSql('ALTER TABLE playlist_screen_region ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 38 | + $this->addSql('CREATE INDEX changed_idx ON playlist_screen_region (changed)'); |
| 39 | + $this->addSql('DROP INDEX relations_modified_at_idx ON playlist_slide'); |
| 40 | + $this->addSql('DROP INDEX modified_at_idx ON playlist_slide'); |
| 41 | + $this->addSql('ALTER TABLE playlist_slide ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 42 | + $this->addSql('CREATE INDEX changed_idx ON playlist_slide (changed)'); |
| 43 | + $this->addSql('ALTER TABLE schedule ADD version INT DEFAULT 1 NOT NULL'); |
| 44 | + $this->addSql('DROP INDEX relations_modified_at_idx ON screen'); |
| 45 | + $this->addSql('DROP INDEX modified_at_idx ON screen'); |
| 46 | + $this->addSql('ALTER TABLE screen ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 47 | + $this->addSql('CREATE INDEX changed_idx ON screen (changed)'); |
| 48 | + $this->addSql('DROP INDEX relations_modified_at_idx ON screen_campaign'); |
| 49 | + $this->addSql('DROP INDEX modified_at_idx ON screen_campaign'); |
| 50 | + $this->addSql('ALTER TABLE screen_campaign ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 51 | + $this->addSql('CREATE INDEX changed_idx ON screen_campaign (changed)'); |
| 52 | + $this->addSql('DROP INDEX modified_at_idx ON screen_group'); |
| 53 | + $this->addSql('DROP INDEX relations_modified_at_idx ON screen_group'); |
| 54 | + $this->addSql('ALTER TABLE screen_group ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 55 | + $this->addSql('CREATE INDEX changed_idx ON screen_group (changed)'); |
| 56 | + $this->addSql('DROP INDEX relations_modified_at_idx ON screen_group_campaign'); |
| 57 | + $this->addSql('DROP INDEX modified_at_idx ON screen_group_campaign'); |
| 58 | + $this->addSql('ALTER TABLE screen_group_campaign ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 59 | + $this->addSql('CREATE INDEX changed_idx ON screen_group_campaign (changed)'); |
| 60 | + $this->addSql('ALTER TABLE screen_layout ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 61 | + $this->addSql('CREATE INDEX changed_idx ON screen_layout (changed)'); |
| 62 | + $this->addSql('ALTER TABLE screen_layout_regions ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 63 | + $this->addSql('CREATE INDEX changed_idx ON screen_layout_regions (changed)'); |
| 64 | + $this->addSql('ALTER TABLE screen_user ADD version INT DEFAULT 1 NOT NULL'); |
| 65 | + $this->addSql('DROP INDEX modified_at_idx ON slide'); |
| 66 | + $this->addSql('DROP INDEX relations_modified_at_idx ON slide'); |
| 67 | + $this->addSql('ALTER TABLE slide ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, DROP relations_modified_at, CHANGE relations_modified relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 68 | + $this->addSql('CREATE INDEX changed_idx ON slide (changed)'); |
| 69 | + $this->addSql('ALTER TABLE template ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, ADD relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 70 | + $this->addSql('CREATE INDEX changed_idx ON template (changed)'); |
| 71 | + $this->addSql('ALTER TABLE tenant ADD version INT DEFAULT 1 NOT NULL'); |
| 72 | + $this->addSql('ALTER TABLE theme ADD version INT DEFAULT 1 NOT NULL, ADD changed TINYINT(1) NOT NULL, ADD relations_checksum JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 73 | + $this->addSql('CREATE INDEX changed_idx ON theme (changed)'); |
| 74 | + $this->addSql('ALTER TABLE user ADD version INT DEFAULT 1 NOT NULL'); |
| 75 | + $this->addSql('ALTER TABLE user_role_tenant ADD version INT DEFAULT 1 NOT NULL'); |
| 76 | + } |
| 77 | + |
| 78 | + public function down(Schema $schema): void |
| 79 | + { |
| 80 | + // this down() migration is auto-generated, please modify it to your needs |
| 81 | + $this->addSql('DROP INDEX changed_idx ON template'); |
| 82 | + $this->addSql('ALTER TABLE template DROP version, DROP changed, DROP relations_checksum'); |
| 83 | + $this->addSql('DROP INDEX changed_idx ON slide'); |
| 84 | + $this->addSql('ALTER TABLE slide ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 85 | + $this->addSql('CREATE INDEX modified_at_idx ON slide (modified_at)'); |
| 86 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON slide (relations_modified_at)'); |
| 87 | + $this->addSql('ALTER TABLE user DROP version'); |
| 88 | + $this->addSql('ALTER TABLE schedule DROP version'); |
| 89 | + $this->addSql('DROP INDEX changed_idx ON screen_group'); |
| 90 | + $this->addSql('ALTER TABLE screen_group ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 91 | + $this->addSql('CREATE INDEX modified_at_idx ON screen_group (modified_at)'); |
| 92 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON screen_group (relations_modified_at)'); |
| 93 | + $this->addSql('ALTER TABLE tenant DROP version'); |
| 94 | + $this->addSql('DROP INDEX changed_idx ON feed_source'); |
| 95 | + $this->addSql('ALTER TABLE feed_source DROP version, DROP changed, DROP relations_checksum'); |
| 96 | + $this->addSql('DROP INDEX changed_idx ON screen_group_campaign'); |
| 97 | + $this->addSql('ALTER TABLE screen_group_campaign ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 98 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON screen_group_campaign (relations_modified_at)'); |
| 99 | + $this->addSql('CREATE INDEX modified_at_idx ON screen_group_campaign (modified_at)'); |
| 100 | + $this->addSql('DROP INDEX changed_idx ON screen_layout_regions'); |
| 101 | + $this->addSql('ALTER TABLE screen_layout_regions ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 102 | + $this->addSql('DROP INDEX changed_idx ON playlist_slide'); |
| 103 | + $this->addSql('ALTER TABLE playlist_slide ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 104 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON playlist_slide (relations_modified_at)'); |
| 105 | + $this->addSql('CREATE INDEX modified_at_idx ON playlist_slide (modified_at)'); |
| 106 | + $this->addSql('DROP INDEX changed_idx ON theme'); |
| 107 | + $this->addSql('ALTER TABLE theme DROP version, DROP changed, DROP relations_checksum'); |
| 108 | + $this->addSql('DROP INDEX changed_idx ON playlist'); |
| 109 | + $this->addSql('ALTER TABLE playlist ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 110 | + $this->addSql('CREATE INDEX modified_at_idx ON playlist (modified_at)'); |
| 111 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON playlist (relations_modified_at)'); |
| 112 | + $this->addSql('DROP INDEX changed_idx ON feed'); |
| 113 | + $this->addSql('ALTER TABLE feed ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 114 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON feed (relations_modified_at)'); |
| 115 | + $this->addSql('CREATE INDEX modified_at_idx ON feed (modified_at)'); |
| 116 | + $this->addSql('DROP INDEX changed_idx ON playlist_screen_region'); |
| 117 | + $this->addSql('ALTER TABLE playlist_screen_region ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 118 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON playlist_screen_region (relations_modified_at)'); |
| 119 | + $this->addSql('CREATE INDEX modified_at_idx ON playlist_screen_region (modified_at)'); |
| 120 | + $this->addSql('ALTER TABLE screen_user DROP version'); |
| 121 | + $this->addSql('DROP INDEX changed_idx ON screen_campaign'); |
| 122 | + $this->addSql('ALTER TABLE screen_campaign ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 123 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON screen_campaign (relations_modified_at)'); |
| 124 | + $this->addSql('CREATE INDEX modified_at_idx ON screen_campaign (modified_at)'); |
| 125 | + $this->addSql('ALTER TABLE user_role_tenant DROP version'); |
| 126 | + $this->addSql('DROP INDEX changed_idx ON screen_layout'); |
| 127 | + $this->addSql('ALTER TABLE screen_layout ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 128 | + $this->addSql('DROP INDEX changed_idx ON media'); |
| 129 | + $this->addSql('ALTER TABLE media DROP version, DROP changed, DROP relations_checksum'); |
| 130 | + $this->addSql('DROP INDEX changed_idx ON screen'); |
| 131 | + $this->addSql('ALTER TABLE screen ADD relations_modified_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP version, DROP changed, CHANGE relations_checksum relations_modified JSON DEFAULT \'{}\' NOT NULL COMMENT \'(DC2Type:json)\''); |
| 132 | + $this->addSql('CREATE INDEX relations_modified_at_idx ON screen (relations_modified_at)'); |
| 133 | + $this->addSql('CREATE INDEX modified_at_idx ON screen (modified_at)'); |
| 134 | + } |
| 135 | +} |
0 commit comments