@@ -28,7 +28,6 @@ You can then look for the shell for PartyA and run your flows.
2828
2929
3030``` sh
31-
3231Thu Apr 22 13:03:05 EDT 2021>>> flow start net.corda.samples.postgres.flows.YoFlow target: PartyB
3332
3433 ✅ Starting
@@ -47,6 +46,7 @@ Flow completed with result: SignedTransaction(id=8B3FC06F685FC8FFD29001CC6205DAE
4746
4847
4948### useful commands for interacting with your postgres container
49+ Here's a couple convenient postgres commands to get you started.
5050
5151``` sh
5252# to list all databases
@@ -57,26 +57,28 @@ docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres
5757
5858# show all roles
5959docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " \dg"
60+ ```
6061
61- # show all tables in a schema
62- docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " \dt party_a_schema.*"
62+ ### Connencting to your database with dbeaver
6363
64- # select custom table rows
65- docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " select * from party_a_schema.iou_states"
64+ You can connect to your db with all kinds of tools like dbeaver, just open up a new connection, specify ` postgreSQL ` in the search bar.
6665
67- # drop a schema
68- docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " drop schema party_a_schema cascade"
66+ The default username we provided in the command above is ` postgres ` and the password is ` test ` .
6967
70- # drop a user
71- docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " REASSIGN OWNED BY party_a TO my_user"
68+ ![ ] ( ./img/config-1.png )
7269
73- # drop a role
74- docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " DROP role party_a"
70+ You can then open the schema editor and try running a couple queries:
7571
76- # Show search path
77- docker exec -i postgres_for_corda psql -U postgres -p 5432 -h localhost postgres -c " show search_path"
72+ ``` sql
73+ -- show all schemas
74+ SELECT schema_name
75+ FROM information_schema .schemata ;
7876```
7977
78+ ![ ] ( ./img/config-2.png )
79+
80+
81+
8082### Troubleshooting
8183You may run into some errors about node identity when running 'deployNodes', this is because the database will already have the node information, so you will want to make sure to clear the database contents so that you don't run into issues when recompiling the nodes.
8284
0 commit comments