Compare commits

...

1 Commits

Author SHA1 Message Date
ea37782810 Fix migration to exclude null user_id in activity_user population
- Added a condition to skip rows with null `user_id` during the `INSERT` operation in the migration script.
2025-12-11 21:49:17 +01:00
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
kind: Fixed
body: |
Fix migration query after previous fix
time: 2025-12-11T21:49:08.899926492+01:00
custom:
Issue: "466"
SchemaChange: No schema change

View File

@@ -39,7 +39,7 @@ final class Version20251118124241 extends AbstractMigration
$this->addSql("COMMENT ON COLUMN activity_user.by_migration IS 'For backup purpose - can be safely deleted after a while. See migration \\Chill\\Migrations\\Activity\\Version20251118124241'");
$this->addSql('INSERT INTO activity_user (activity_id, user_id, by_migration)
SELECT id, user_id, true FROM activity
SELECT id, user_id, true FROM activity WHERE user_id is not null
ON CONFLICT DO NOTHING');
}