mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
58c44f55dd
GitOrigin-RevId: 1c8c4d60e033c8a0bc8b2beed24c5bceb7d4bcc8 |
||
---|---|---|
.. | ||
edit-pg-dump.sh | ||
index.go | ||
now.json | ||
README.md |
hasura-edit-pg-dump
This is a serverless function written in Go and deployed onto now.sh which can
take the SQL output from pg_dump
and clean it up so that it can be used as a
migration file with Hasura.
- SQL front matter, like
SET
statements are removed. CREATE SCHEMA public
is removed.- Comments (
--
) and empty newlines are removed. - Postgres triggers created by Hasura for event triggers are removed.
This app is available at https://hasura-edit-pg-dump.now.sh
Usage:
curl --data-binary @file.sql https://hasura-edit-pg-dump.now.sh > cleaned.sql
A bash version is also available:
./edit-pg-dump.sh filename.sql