Skip to content

Commit 4f27ba0

Browse files
turegjorupclaude
andcommitted
feat: regenerate consolidated migration against post-#444 entity shape
Picks up #444's portability fixes (15 changed_idx index renames and backtick-quoted user table) into the consolidated end-of-2.8 schema so fresh 3.0 installs and 2.x → 3.0 rollups land on the same DDL the 2.x → 2.8 → 3.0 upgrade path produces via Version20260507120000. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e2c4ac9 commit 4f27ba0

17 files changed

Lines changed: 34 additions & 33 deletions

migrations/Version20260506215847.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function up(Schema $schema): void
4949
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
5050
INDEX IDX_234044AB9033212A (tenant_id),
5151
INDEX IDX_234044ABDDAEFFBD (feed_source_id),
52-
INDEX changed_idx (changed),
52+
INDEX feed_changed_idx (changed),
5353
PRIMARY KEY(id)
5454
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
5555
SQL);
@@ -70,7 +70,7 @@ public function up(Schema $schema): void
7070
changed TINYINT(1) NOT NULL,
7171
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
7272
INDEX IDX_9DA80F879033212A (tenant_id),
73-
INDEX changed_idx (changed),
73+
INDEX feed_source_changed_idx (changed),
7474
PRIMARY KEY(id)
7575
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
7676
SQL);
@@ -110,7 +110,7 @@ public function up(Schema $schema): void
110110
changed TINYINT(1) NOT NULL,
111111
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
112112
INDEX IDX_6A2CA10C9033212A (tenant_id),
113-
INDEX changed_idx (changed),
113+
INDEX media_changed_idx (changed),
114114
PRIMARY KEY(id)
115115
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
116116
SQL);
@@ -131,7 +131,7 @@ public function up(Schema $schema): void
131131
changed TINYINT(1) NOT NULL,
132132
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
133133
INDEX IDX_D782112D9033212A (tenant_id),
134-
INDEX changed_idx (changed),
134+
INDEX playlist_changed_idx (changed),
135135
PRIMARY KEY(id)
136136
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
137137
SQL);
@@ -163,7 +163,7 @@ public function up(Schema $schema): void
163163
INDEX IDX_6869486A6BBD148 (playlist_id),
164164
INDEX IDX_6869486A41A67722 (screen_id),
165165
INDEX IDX_6869486A98260155 (region_id),
166-
INDEX changed_idx (changed),
166+
INDEX playlist_screen_region_changed_idx (changed),
167167
UNIQUE INDEX unique_playlist_screen_region (
168168
playlist_id, screen_id, region_id
169169
),
@@ -187,7 +187,7 @@ public function up(Schema $schema): void
187187
INDEX IDX_D1F3F7219033212A (tenant_id),
188188
INDEX IDX_D1F3F7216BBD148 (playlist_id),
189189
INDEX IDX_D1F3F721DD5AFB87 (slide_id),
190-
INDEX changed_idx (changed),
190+
INDEX playlist_slide_changed_idx (changed),
191191
PRIMARY KEY(id)
192192
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
193193
SQL);
@@ -239,7 +239,7 @@ public function up(Schema $schema): void
239239
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
240240
INDEX IDX_DF4C61309033212A (tenant_id),
241241
INDEX IDX_DF4C6130C1ECB8D6 (screen_layout_id),
242-
INDEX changed_idx (changed),
242+
INDEX screen_changed_idx (changed),
243243
PRIMARY KEY(id)
244244
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
245245
SQL);
@@ -259,7 +259,7 @@ public function up(Schema $schema): void
259259
INDEX IDX_636686BD9033212A (tenant_id),
260260
INDEX IDX_636686BDF639F774 (campaign_id),
261261
INDEX IDX_636686BD41A67722 (screen_id),
262-
INDEX changed_idx (changed),
262+
INDEX screen_campaign_changed_idx (changed),
263263
PRIMARY KEY(id)
264264
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
265265
SQL);
@@ -277,7 +277,7 @@ public function up(Schema $schema): void
277277
changed TINYINT(1) NOT NULL,
278278
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
279279
INDEX IDX_10C764819033212A (tenant_id),
280-
INDEX changed_idx (changed),
280+
INDEX screen_group_changed_idx (changed),
281281
PRIMARY KEY(id)
282282
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
283283
SQL);
@@ -306,7 +306,7 @@ public function up(Schema $schema): void
306306
INDEX IDX_1E364E6E9033212A (tenant_id),
307307
INDEX IDX_1E364E6EF639F774 (campaign_id),
308308
INDEX IDX_1E364E6E82274D27 (screen_group_id),
309-
INDEX changed_idx (changed),
309+
INDEX screen_group_campaign_changed_idx (changed),
310310
PRIMARY KEY(id)
311311
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
312312
SQL);
@@ -324,7 +324,7 @@ public function up(Schema $schema): void
324324
description VARCHAR(255) DEFAULT '' NOT NULL,
325325
changed TINYINT(1) NOT NULL,
326326
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
327-
INDEX changed_idx (changed),
327+
INDEX screen_layout_changed_idx (changed),
328328
PRIMARY KEY(id)
329329
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
330330
SQL);
@@ -352,7 +352,7 @@ public function up(Schema $schema): void
352352
changed TINYINT(1) NOT NULL,
353353
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
354354
INDEX IDX_D80836ADC1ECB8D6 (screen_layout_id),
355-
INDEX changed_idx (changed),
355+
INDEX screen_layout_regions_changed_idx (changed),
356356
PRIMARY KEY(id)
357357
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
358358
SQL);
@@ -414,7 +414,7 @@ public function up(Schema $schema): void
414414
INDEX IDX_72EFEE625DA0FB8 (template_id),
415415
INDEX IDX_72EFEE6259027487 (theme_id),
416416
UNIQUE INDEX UNIQ_72EFEE6251A5BC03 (feed_id),
417-
INDEX changed_idx (changed),
417+
INDEX slide_changed_idx (changed),
418418
PRIMARY KEY(id)
419419
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
420420
SQL);
@@ -441,7 +441,7 @@ public function up(Schema $schema): void
441441
description VARCHAR(255) DEFAULT '' NOT NULL,
442442
changed TINYINT(1) NOT NULL,
443443
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
444-
INDEX changed_idx (changed),
444+
INDEX template_changed_idx (changed),
445445
PRIMARY KEY(id)
446446
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
447447
SQL);
@@ -487,12 +487,12 @@ public function up(Schema $schema): void
487487
relations_checksum JSON DEFAULT '{}' NOT NULL COMMENT '(DC2Type:json)',
488488
INDEX IDX_9775E7089033212A (tenant_id),
489489
UNIQUE INDEX UNIQ_9775E708F98F144A (logo_id),
490-
INDEX changed_idx (changed),
490+
INDEX theme_changed_idx (changed),
491491
PRIMARY KEY(id)
492492
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
493493
SQL);
494494
$this->addSql(<<<'SQL'
495-
CREATE TABLE user (
495+
CREATE TABLE `user` (
496496
id BINARY(16) NOT NULL COMMENT '(DC2Type:ulid)',
497497
version INT DEFAULT 1 NOT NULL,
498498
created_at DATETIME NOT NULL COMMENT '(DC2Type:datetime_immutable)',
@@ -827,7 +827,7 @@ public function up(Schema $schema): void
827827
ALTER TABLE
828828
user_role_tenant
829829
ADD
830-
CONSTRAINT FK_4C64EC46A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)
830+
CONSTRAINT FK_4C64EC46A76ED395 FOREIGN KEY (user_id) REFERENCES `user` (id)
831831
SQL);
832832
$this->addSql(<<<'SQL'
833833
ALTER TABLE
@@ -913,7 +913,7 @@ public function down(Schema $schema): void
913913
$this->addSql('DROP TABLE template_tenant');
914914
$this->addSql('DROP TABLE tenant');
915915
$this->addSql('DROP TABLE theme');
916-
$this->addSql('DROP TABLE user');
916+
$this->addSql('DROP TABLE `user`');
917917
$this->addSql('DROP TABLE user_activation_code');
918918
$this->addSql('DROP TABLE user_role_tenant');
919919
}

src/Entity/ScreenLayout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#[ORM\Entity(repositoryClass: ScreenLayoutRepository::class)]
1919
#[ORM\EntityListeners([\App\EventListener\ScreenLayoutDoctrineEventListener::class])]
20-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
20+
#[ORM\Index(fields: ['changed'], name: 'screen_layout_changed_idx')]
2121
class ScreenLayout extends AbstractBaseEntity implements MultiTenantInterface, RelationsChecksumInterface
2222
{
2323
use MultiTenantTrait;

src/Entity/ScreenLayoutRegions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#[ORM\Entity(repositoryClass: ScreenLayoutRegionsRepository::class)]
1919
#[ORM\EntityListeners([\App\EventListener\ScreenLayoutRegionsDoctrineEventListener::class])]
20-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
20+
#[ORM\Index(fields: ['changed'], name: 'screen_layout_regions_changed_idx')]
2121
class ScreenLayoutRegions extends AbstractBaseEntity implements MultiTenantInterface, RelationsChecksumInterface
2222
{
2323
use MultiTenantTrait;

src/Entity/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#[ORM\Entity(repositoryClass: TemplateRepository::class)]
2020
#[ORM\EntityListeners([TemplateDoctrineEventListener::class])]
21-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
21+
#[ORM\Index(fields: ['changed'], name: 'template_changed_idx')]
2222
class Template extends AbstractBaseEntity implements MultiTenantInterface, RelationsChecksumInterface
2323
{
2424
use MultiTenantTrait;

src/Entity/Tenant/Feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#[ORM\Entity(repositoryClass: FeedRepository::class)]
1313
#[ORM\EntityListeners([\App\EventListener\FeedDoctrineEventListener::class])]
14-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
14+
#[ORM\Index(fields: ['changed'], name: 'feed_changed_idx')]
1515
class Feed extends AbstractTenantScopedEntity implements RelationsChecksumInterface
1616
{
1717
use RelationsChecksumTrait;

src/Entity/Tenant/FeedSource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#[ORM\Entity(repositoryClass: FeedSourceRepository::class)]
1616
#[ORM\EntityListeners([\App\EventListener\FeedSourceDoctrineEventListener::class])]
17-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
17+
#[ORM\Index(fields: ['changed'], name: 'feed_source_changed_idx')]
1818
class FeedSource extends AbstractTenantScopedEntity implements RelationsChecksumInterface
1919
{
2020
use EntityTitleDescriptionTrait;

src/Entity/Tenant/Media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#[Vich\Uploadable]
1919
#[ORM\Entity(repositoryClass: MediaRepository::class)]
2020
#[ORM\EntityListeners([\App\EventListener\MediaDoctrineEventListener::class])]
21-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
21+
#[ORM\Index(fields: ['changed'], name: 'media_changed_idx')]
2222
class Media extends AbstractTenantScopedEntity implements RelationsChecksumInterface
2323
{
2424
use EntityTitleDescriptionTrait;

src/Entity/Tenant/Playlist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Doctrine\ORM\Mapping as ORM;
1818

1919
#[ORM\Entity(repositoryClass: PlaylistRepository::class)]
20-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
20+
#[ORM\Index(fields: ['changed'], name: 'playlist_changed_idx')]
2121
class Playlist extends AbstractTenantScopedEntity implements MultiTenantInterface, RelationsChecksumInterface
2222
{
2323
use EntityPublishedTrait;

src/Entity/Tenant/PlaylistScreenRegion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#[ORM\UniqueConstraint(name: 'unique_playlist_screen_region', columns: ['playlist_id', 'screen_id', 'region_id'])]
1414
#[ORM\Entity(repositoryClass: PlaylistScreenRegionRepository::class)]
15-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
15+
#[ORM\Index(fields: ['changed'], name: 'playlist_screen_region_changed_idx')]
1616
class PlaylistScreenRegion extends AbstractTenantScopedEntity implements RelationsChecksumInterface
1717
{
1818
use RelationsChecksumTrait;

src/Entity/Tenant/PlaylistSlide.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Doctrine\ORM\Mapping as ORM;
1111

1212
#[ORM\Entity(repositoryClass: PlaylistSlideRepository::class)]
13-
#[ORM\Index(fields: ['changed'], name: 'changed_idx')]
13+
#[ORM\Index(fields: ['changed'], name: 'playlist_slide_changed_idx')]
1414
class PlaylistSlide extends AbstractTenantScopedEntity implements RelationsChecksumInterface
1515
{
1616
use RelationsChecksumTrait;

0 commit comments

Comments
 (0)