Separate out the "DROP" sql code. In docker, it results an error "cannot drop the currently open database".

This commit is contained in:
Chloe Jung 2023-01-31 16:50:55 +13:00
parent a0725fea0b
commit 2ea481e281
5 changed files with 7 additions and 6 deletions

View file

@ -1,9 +1,3 @@
DROP DATABASE IF EXISTS card_db;
CREATE DATABASE card_db;
DROP USER IF EXISTS cardapp;
CREATE USER cardapp WITH PASSWORD 'database_password';
\c card_db;
CREATE TABLE settings (