Skip to content

Commit f18258b

Browse files
1ukastesarsolumath
authored andcommitted
revert: "update docs with container name"
This reverts commit 8747d6c (leaves the changes to `config.template.toml` in place tho)
1 parent 763c110 commit f18258b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

database/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Connecting to the DB through Docker (externally)
44

55
```bash
6-
docker compose exec -it rubbergod-postgres psql -U rubbergod
6+
docker compose exec -it db psql -U rubbergod
77
```
88

99
PostgreSQL prompt will open and you can now run any SQL (or Postgre-specific) commands you want. To quit, press Ctrl+D.
@@ -71,13 +71,13 @@ That way, the module gets imported on startup and creates the table automaticall
7171
> For most of these operations you need the database container running.
7272
> ```bash
7373
> docker compose down # first make sure the bot is not running
74-
> docker compose up -d rubbergod-postgres
74+
> docker compose up -d db
7575
> ```
7676
7777
To backup the database, run the following command:
7878
7979
```bash
80-
docker compose exec rubbergod-postgres pg_dump -U rubbergod -d rubbergod > backup.sql
80+
docker compose exec db pg_dump -U rubbergod -d rubbergod > backup.sql
8181
```
8282
8383
Restore the database from the backup file automatically by running the following commands:
@@ -95,21 +95,21 @@ To manually restore the database, run the following commands:
9595

9696
```bash
9797
# drop and recreate the database must be separate commands
98-
docker compose exec rubbergod-postgres psql -U rubbergod -d postgres -c "DROP DATABASE rubbergod;"
99-
docker compose exec rubbergod-postgres psql -U rubbergod -d postgres -c "CREATE DATABASE rubbergod WITH OWNER rubbergod;"
98+
docker compose exec db psql -U rubbergod -d postgres -c "DROP DATABASE rubbergod;"
99+
docker compose exec db psql -U rubbergod -d postgres -c "CREATE DATABASE rubbergod WITH OWNER rubbergod;"
100100

101101
# restore the database from the backup file
102-
docker compose exec -T rubbergod-postgres psql -U rubbergod < backup.sql
102+
docker compose exec -T db psql -U rubbergod < backup.sql
103103
```
104104

105105
You can drop specific table using this command:
106106

107107
```bash
108-
docker compose exec rubbergod-postgres psql -U rubbergod -c "DROP TABLE [table_name] CASCADE;"
108+
docker compose exec db psql -U rubbergod -c "DROP TABLE [table_name] CASCADE;"
109109
```
110110

111111
To get only specific table and it's data use this command:
112112

113113
```bash
114-
docker compose exec rubbergod-postgres pg_dump -U rubbergod -d rubbergod -t [table_name] > [table_name].sql
114+
docker compose exec db pg_dump -U rubbergod -d rubbergod -t [table_name] > [table_name].sql
115115
```

0 commit comments

Comments
 (0)