Created
March 27, 2024 22:23
-
-
Save madalinignisca/3c40c3af7d4cbb486ceeb36db5305a6e to your computer and use it in GitHub Desktop.
Rename schema to public in a postgresql database
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
BEGIN TRANSACTION; | |
ALTER SCHEMA public RENAME TO public_original; | |
ALTER SCHEMA my_db RENAME TO public; | |
DROP SCHEMA public_original CASCADE; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment