Skip to content

Commit 7d4a5a8

Browse files
authored
rename database from votes to rental to match the demo scenario (#121)
* rename database from votes to rental to match the demo scenario * forward postgresql's port when running okteto up on the worker
1 parent f6596ce commit 7d4a5a8

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

api/pkg/database/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212
port = 5432
1313
user = "okteto"
1414
password = "okteto"
15-
dbname = "votes"
15+
dbname = "rentals"
1616
)
1717

1818
func Open() *sql.DB {

docs/creating-db-snapshot.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ Before creating a database snapshot you will need to create an instance of the d
2424
4. In another terminal, connect to database using psql:
2525

2626
```
27-
$ psql -h localhost -p 5432 -U okteto -d votes
27+
$ psql -h localhost -p 5432 -U okteto -d rentals
2828
Password for user okteto: #The password is "okteto"
2929
psql (14.5 (Ubuntu 14.5-0ubuntu0.22.04.1), server 14.4)
3030
Type "help" for help.
3131
32-
votes=>
32+
rentals=>
3333
```
3434

3535
5. Modify the data as needed for your purposes. In this example, we'll just update the last-name column to a static value but you can make any needed modifications here.
3636

3737
```
38-
votes=> UPDATE users SET last_name='testing-snapshot';
38+
rentals=> UPDATE users SET last_name='testing-snapshot';
3939
```
4040

4141
### Create VolumeSnapshot

okteto.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ dev:
5050
- /root/.m2
5151
forward:
5252
- 5005:5005
53+
- 5432:postgresql:5432
5354
api:
5455
image: okteto/golang:1.22
5556
command: bash

postgresql/values.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
auth:
22
username: okteto
33
password: okteto
4-
database: votes
4+
database: rentals
55

66
primary:
77
persistence:

worker/pkg/database/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212
port = 5432
1313
user = "okteto"
1414
password = "okteto"
15-
dbname = "votes"
15+
dbname = "rentals"
1616
)
1717

1818
func Open() *sql.DB {

0 commit comments

Comments
 (0)