hashgraph / hedera-exchange-rate-tool

Hedera Exchange Rate Tool to send median of HBAR/USD exchange rate from various Exchanges to Hedera Network
Apache License 2.0
2 stars 4 forks source link

Create a SQL database and appropriate Schema in GCP #184

Open anighanta opened 2 years ago

anighanta commented 2 years ago

We have to have a SQL Postgres database with appropriate tables withe following schema available on GCP in-order to make ERT compatible with GCP.

Database name : exchange_rate

Table1: name: address_book fields: long:expiration_time, json:address_book, varchar:network_name

Table2: name: exchange_rate fields: long:expiration_time, json:exchange_rate_file

Table3: name: midnight_rate fields: long:expiration_time, json:exchange_rate_file

Table4: name: queried_rates fields: long:expiration_time, json:queried_rates

steven-sheehy commented 2 years ago

Should use snake_case for database name and field names.

anighanta commented 2 years ago

realized it is better to use postgres instead of Mysql server on GCP Cloud SQL as flyway currently requires additional jar to support jdbc connections to mysql server and so json datatype in postgres :D

anighanta commented 2 years ago

Was able to create an instance which I used for a poc.