Skip to content

Commit 2aff202

Browse files
committed
Clarify consent hash is not reverible without destruction of data
1 parent ed2bcf2 commit 2aff202

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

migrations/DoctrineMigrations/Version20260315000001.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function up(Schema $schema): void
4646

4747
public function down(Schema $schema): void
4848
{
49-
$this->addSql('UPDATE consent SET attribute = attribute_stable WHERE attribute IS NULL AND attribute_stable IS NOT NULL');
49+
$this->warnIf(true, 'This migration is not reversible without deleting all migrated consent hashes.' .
50+
' Manually run `DELETE FROM consent WHERE attribute IS NOT NULL` to delete all migrated consent hashes.');
5051
$this->addSql('ALTER TABLE consent CHANGE attribute attribute VARCHAR(80) NOT NULL');
5152
$this->addSql('ALTER TABLE consent DROP attribute_stable');
5253
}

0 commit comments

Comments
 (0)