Add instructions on PostgreSQL script execution in docs (#315)

This commit is contained in:
dx9er 2022-09-21 08:09:21 +03:00 committed by GitHub
parent 5a3364736d
commit a2c7f0185d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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!