Last active
August 29, 2015 14:13
-
-
Save keepitsimple/e959900a79f75ae806a7 to your computer and use it in GitHub Desktop.
Postgresql remove all entities (tables, ets) from the schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- drop all object in the schema | |
drop schema public cascade; | |
create schema public; | |
-- change owner of the schema and all objects | |
REASSIGN OWNED BY old_role [, ...] TO new_role |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment