(schema: string)
| 287 | } |
| 288 | |
| 289 | export function createSchemaTriggerFunction(schema: string): string { |
| 290 | return ` |
| 291 | CREATE OR REPLACE FUNCTION "${schema}".schema_notification() |
| 292 | RETURNS trigger AS $$ |
| 293 | BEGIN |
| 294 | PERFORM pg_notify( |
| 295 | '${hashName(schema, 'schema_channel', '_metadata')}', |
| 296 | 'schema_updated'); |
| 297 | RETURN NULL; |
| 298 | END; |
| 299 | $$ LANGUAGE plpgsql;`; |
| 300 | } |
| 301 | |
| 302 | export function createRewindTrigger(schema: string): string { |
| 303 | const triggerName = hashName(schema, 'rewind_trigger', '_global'); |
no test coverage detected