Skip to content

Commit

Permalink
Fix bug windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Duta-Sebastian committed Dec 22, 2024
1 parent 1b89f05 commit fb902c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/actions/configure-PostgreSQL/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
$env:PGPASSWORD = "root"
$env:PATH += ";C:\Program Files\PostgreSQL\14\bin"
$env:PATH += ";C:\Program Files\PostgreSQL\14\lib"
psql -h 127.0.0.1 -U postgres -c "CREATE USER `"$DATABASE_USER`" WITH CREATEDB PASSWORD '$DATABASE_PASSWORD';"
psql -h 127.0.0.1 -U postgres -c "CREATE USER `"$DATABASE_USER`" WITH CREATEDB PASSWORD `"'$DATABASE_PASSWORD'`";"
psql -h 127.0.0.1 -U postgres -c "CREATE DATABASE `"$DATABASE_NAME`" WITH OWNER `"$DATABASE_USER`";"
$env:PGPASSWORD = "$DATABASE_PASSWORD"
psql -h 127.0.0.1 -U $DATABASE_USER -c "\l;"
psql -h 127.0.0.1 -U $DATABASE_USER -d $DATABASE_NAME -c "\dt;"
2 changes: 1 addition & 1 deletion database/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "Database.h"

Database::Database(const bool& with_drop_tables) {
connString = "dbname=oop_db user=oop password=ooppa55 host=127.0.0.1 port=5432 connect_timeout=10";
connString = "dbname=oop_db user=oop password=ooppa55 hostaddr=127.0.0.1 port=5432 connect_timeout=10";
std::cout<< std::flush;
std::cout << connString;
connection = std::make_unique<pqxx::connection>(connString);
Expand Down

0 comments on commit fb902c8

Please sign in to comment.