Skip to content

Commit

Permalink
fix: postgres command to store json as text
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed May 1, 2024
1 parent f6131c8 commit 1e6e960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keylistCron/send_commitment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
echo "Keylist $KEYLIST_HASH attestation completed successfully!"

# Connect to the database and save the keylist JSON
PG_COMMAND="PGPASSWORD=mercurypass@12345 psql -h vultr-prod-e795780f-1f41-4d13-978d-5fd624923873-vultr-prod-86c1.vultrdb.com -p 16751 -d defaultdb -U mercury -c \"CREATE TABLE IF NOT EXISTS keylist_info ( json_data json NOT NULL ); INSERT INTO keylist_info (json_data) VALUES ($KEYLIST_JSON);\""
PG_COMMAND="PGPASSWORD=mercurypass@12345 psql -h vultr-prod-e795780f-1f41-4d13-978d-5fd624923873-vultr-prod-86c1.vultrdb.com -p 16751 -d defaultdb -U mercury -c \"CREATE TABLE IF NOT EXISTS keylist_info ( json_data LONGTEXT NOT NULL, keylist_hash TEXT NOT NULL ); INSERT INTO keylist_info (json_data, keylist_hash) VALUES ('$KEYLIST_JSON', '$KEYLIST_HASH');\""

echo "PG_COMMAND $PG_COMMAND"
# Execute the PostgreSQL command
Expand Down

0 comments on commit 1e6e960

Please sign in to comment.