graphql-engine/docs/examples_schema_migrations/1530877309397_run_sql_migration.up.yaml
2018-09-11 16:41:24 +05:30

13 lines
410 B
YAML

- 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