fix: Sink

This commit is contained in:
Prad
2024-12-19 00:48:42 +00:00
parent 6072f6ecfa
commit 265aec187e
20 changed files with 138 additions and 43 deletions
+19
View File
@@ -0,0 +1,19 @@
-- Connect to a different database first (postgres) since we can't drop a database while connected to it
\c postgres;
-- Terminate all connections to the databases
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE datname IN ('chainindex', 'highway', 'matrixhs')
AND pid <> pg_backend_pid();
-- Drop the databases if they exist
DROP DATABASE IF EXISTS chainindex;
DROP DATABASE IF EXISTS highway;
DROP DATABASE IF EXISTS matrixhs;
-- Drop the users if they exist
DROP USER IF EXISTS chainindex_user;
DROP USER IF EXISTS highway_user;
DROP USER IF EXISTS matrixhs_user;