Skip to content

Commit dddfb68

Browse files
author
Mateusz Czeladka
committed
refactor: public schema instead of network specific schema.
1 parent cd2e21b commit dddfb68

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

.env.IntegrationTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DB_SECRET=weakpwd#123_d
1717
DB_HOST=db
1818
# Service name in docker-compose or local db
1919
DB_PORT=5432
20-
DB_SCHEMA=${NETWORK}
20+
DB_SCHEMA=public
2121
DB_PATH=data
2222
UPDATE_GENESIS_BLOCK_QUERY="UPDATE devkit.block SET number = 0 WHERE number = -1; UPDATE devkit.block SET prev_hash = 'Genesis' WHERE number = 1"
2323
#UPDATE_GENESIS_BLOCK_QUERY="UPDATE devkit.block SET prev_hash = 'Genesis' WHERE number = 1"

.env.docker-compose

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DB_SECRET=weakpwd#123_d
1717
DB_HOST=db
1818
# Service name in docker-compose or local db
1919
DB_PORT=5432
20-
DB_SCHEMA=${NETWORK}
20+
DB_SCHEMA=public
2121
DB_PATH=data
2222

2323
## Cardano Node variables

api/src/main/resources/config/application-online.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spring:
66
datasource:
77
username: ${DB_USER:rosetta_db_admin}
88
password: ${DB_SECRET:weakpwd#123_d}
9-
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5433}/${DB_NAME:test}?currentSchema=${DB_SCHEMA:preprod}
9+
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5433}/${DB_NAME:test}?currentSchema=${DB_SCHEMA:public}
1010
hikari:
1111
poolName: "CardanoRosettaJavaDBPool"
1212

api/src/main/resources/config/application-staging.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ spring:
55
datasource:
66
username: rosetta_db_service_user
77
password: weakerpwd#123_d
8-
url: jdbc:postgresql://172.16.1.217:5432/rosetta?currentSchema=${DB_SCHEMA:preprod}
8+
url: jdbc:postgresql://172.16.1.217:5432/rosetta?currentSchema=${DB_SCHEMA:public}
99
jpa:
1010
properties:
1111
hibernate:

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ configure_postgres() {
147147
}
148148

149149
create_database_and_user() {
150-
export DB_SCHEMA=$NETWORK
150+
export DB_SCHEMA=public
151151

152152
flag=true
153153
while [ $(sudo -u postgres psql -U postgres -Atc "SELECT pg_is_in_recovery()";) == "t" ]; do

docs/docs/getting-started/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Within root folder of the project there are example `.env` files, which can be c
1414
- `.env.docker-compose` - Is used for standard docker-compose setup (Copy this file and adjusted it to your needs)
1515

1616
| Variable | Description | Default |
17-
| ---------------------------- | ---------------------------- | ------------------------------------- |
17+
| ---------------------------- | ---------------------------- |---------------------------------------|
1818
| `LOG` | Log level | INFO |
1919
| `NETWORK` | Network | mainnet |
2020
| `MITHRIL_SYNC` | Sync from Mithril snapshot | true |
@@ -26,7 +26,7 @@ Within root folder of the project there are example `.env` files, which can be c
2626
| `DB_SECRET` | Postgres admin secret | weakpwd#123_d |
2727
| `DB_HOST` | Postgres host | db |
2828
| `DB_PORT` | Postgres port | 5432 |
29-
| `DB_SCHEMA` | Database schema | mainnet |
29+
| `DB_SCHEMA` | Database schema | public |
3030
| `DB_PATH` | Database path | /data |
3131
| `CARDANO_NODE_HOST` | Cardano node host | cardano-node |
3232
| `CARDANO_NODE_PORT` | Cardano node port | 3001 |

yaci-indexer/src/main/resources/application-postgres.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
####################################################
55

66
##################### Postgres DB #######################
7-
spring.datasource.url=jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5433}/${DB_NAME:rosetta-java}?currentSchema=${DB_SCHEMA:preprod}
7+
spring.datasource.url=jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5433}/${DB_NAME:rosetta-java}?currentSchema=${DB_SCHEMA:public}
88
spring.datasource.username=${DB_USER:rosetta_db_admin}
99
spring.datasource.password=${DB_SECRET:weakpwd#123_d}

0 commit comments

Comments
 (0)