Skip to content

Instantly share code, notes, and snippets.

@r3code
Created June 26, 2020 15:59
Show Gist options
  • Save r3code/8287601b2f8c4c20b1fc0c827d9f393b to your computer and use it in GitHub Desktop.
Save r3code/8287601b2f8c4c20b1fc0c827d9f393b to your computer and use it in GitHub Desktop.
PostgreSQL query to drop all tables at once at specified shema (helps with dirty state in go-migrate)
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment