createOrReplaceNoFkUpdateTrigger method
Creates or replaces a trigger that prevents updates to the primary key.
Implementation
List<String> createOrReplaceNoFkUpdateTrigger(
QualifiedTablename table,
List<String> pk,
) {
return [
dropTriggerIfExists(
'update_ensure_${table.namespace}_${table.tablename}_primarykey',
table,
),
...createNoFkUpdateTrigger(table, pk),
];
}