I have a Postgres DB deployment in Compose.io, and I am using the standard "compose" db for my app. I would like to wipe out the current DB contents so that I can recreate the DB with a new schema. I have read that the best way to do this is with "drop schema public cascade", but when I try to do this on my db I get
ERROR: must be owner of schema public
It turns out that the schema is not owned by
admin (the user that compose provides for psql access), but by a user named
compose=> \dn List of schemas Name | Owner --------+-------- public | focker (1 row)
I tried changing the schema owner but that fails with the same error as above.
Why is my db set up this way? Is there any way I can change it so that the admin user can wipe out a db?