You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add feature toggle and tests for stable hash migration
Introduces the `feature_stable_consent_hash_migration` toggle
(default: false) to control when the legacy `attribute` column is
phased out, and adds edge-case test coverage.
Toggle OFF (default): new consent writes both `attribute` and
`attribute_stable` so old EB instances still find records during a
rolling deploy; hash upgrades leave `attribute` intact.
Toggle ON: new consent writes only `attribute_stable` (attribute=NULL)
and upgrades null the old column, cleaning it up over time once all
instances run the new version.
Also:
- Add edge-case tests for consent hash versioning
- Fix test configuration for consent scenarios
- Drop redundant unserialize/serialize deep copies in ConsentHashService
(PHP passes arrays by value; a mutation-safety regression test is
added to guard against future changes)
Copy file name to clipboardExpand all lines: migrations/DoctrineMigrations/Version20260315000001.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ public function up(Schema $schema): void
30
30
31
31
publicfunctiondown(Schema$schema): void
32
32
{
33
-
$this->addSql('ALTER TABLE consent DROP attribute_stable, CHANGE attribute attribute VARCHAR(80) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`');
33
+
$this->addSql('UPDATE consent SET attribute = attribute_stable WHERE attribute IS NULL AND attribute_stable IS NOT NULL');
34
+
$this->addSql('ALTER TABLE consent CHANGE attribute attribute VARCHAR(80) NOT NULL');
35
+
$this->addSql('ALTER TABLE consent DROP attribute_stable');
0 commit comments