graphql-engine/docs/examples_schema_migrations/1530877309397_run_sql_migration.up.yaml

13 lines
410 B
YAML
Raw Normal View History

- args:
sql: |-
CREATE FUNCTION test_func() RETURNS trigger AS $emp_stamp$
BEGIN
NEW.output := UPPER(NEW.input);
RETURN NEW;
END;
$emp_stamp$ LANGUAGE plpgsql;
CREATE TRIGGER test_trigger BEFORE INSERT OR UPDATE ON sql_function_table
FOR EACH ROW EXECUTE PROCEDURE test_func();
type: run_sql