update onDelete behavior for groupId in match_table to set null

This commit is contained in:
2026-03-09 15:29:18 +01:00
parent b0b039875a
commit 3fe421676c
2 changed files with 7 additions and 5 deletions

View File

@@ -1123,7 +1123,7 @@ class $MatchTableTable extends MatchTable
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'REFERENCES group_table (id) ON DELETE CASCADE',
'REFERENCES group_table (id) ON DELETE SET NULL',
),
);
static const VerificationMeta _nameMeta = const VerificationMeta('name');
@@ -2780,7 +2780,7 @@ abstract class _$AppDatabase extends GeneratedDatabase {
'group_table',
limitUpdateKind: UpdateKind.delete,
),
result: [TableUpdate('match_table', kind: UpdateKind.delete)],
result: [TableUpdate('match_table', kind: UpdateKind.update)],
),
WritePropagation(
on: TableUpdateQuery.onTableName(