Skip to content

Commit

Permalink
refactor(init.sql): updated migrations file for creating the db
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye committed Sep 17, 2023
1 parent 0379671 commit d924f17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/migrations/init.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
CREATE DATABASE IF NOT EXISTS "legacy";
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_database WHERE datname = 'legacy') THEN
CREATE DATABASE "legacy";
END IF;
END $$;

CREATE TABLE IF NOT EXISTS users
(
Expand Down

0 comments on commit d924f17

Please sign in to comment.