Created
July 25, 2024 10:54
-
-
Save erezLieberman/1e3232863d540d75715811828f08db1c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
DO $$ | |
DECLARE | |
table_name_var text; | |
BEGIN | |
FOR table_name_var IN (SELECT table_name FROM information_schema.tables WHERE table_schema = 'public') | |
LOOP | |
EXECUTE 'DROP TABLE IF EXISTS ' || table_name_var || ' CASCADE;'; | |
END LOOP; | |
END $$; | |
DROP EXTENSION IF EXISTS "uuid-ossp"; | |
DROP EXTENSION IF EXISTS "pg_trgm"; | |
DROP EXTENSION IF EXISTS "btree_gin"; | |
CREATE EXTENSION IF NOT EXISTS "plpgsql"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment