From a2c7f0185df8a9d56b0f4ab4b1712e4e876edc24 Mon Sep 17 00:00:00 2001 From: dx9er Date: Wed, 21 Sep 2022 08:09:21 +0300 Subject: [PATCH] Add instructions on PostgreSQL script execution in docs (#315) --- docs/postgresql.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/postgresql.md b/docs/postgresql.md index 3b2abda..d06d8fb 100644 --- a/docs/postgresql.md +++ b/docs/postgresql.md @@ -49,8 +49,9 @@ Once you're inside the shell, you'll need to make sure the bot owns the database ```sql ALTER DATABASE esmbot OWNER TO esmbot; ``` -The database is now accessible by the bot, but it still doesn't know how to add/get data from it. To fix that, you'll need to add some tables. Luckily, the bot comes with a script to automate this: +The database is now accessible by the bot, but the bot may not function yet as the tables to add/get data are still missing. To fix that, you'll need to add them. Luckily, the bot comes with a script to automate this. First, exit the PostgreSQL shell by typing `\q`, then make the script executable and run it by entering the following commands: ```sh +chmod +x utils/psqlinit.sh POSTGRES_USER=esmbot POSTGRES_DB=esmbot utils/psqlinit.sh ``` You're done! @@ -65,4 +66,4 @@ GRANT ALL PRIVILEGES ON guilds TO esmbot; GRANT ALL PRIVILEGES ON counts TO esmbot; GRANT ALL PRIVILEGES ON tags TO esmbot; \q -``` \ No newline at end of file +```