kind: ConfigMap
apiVersion: v1
metadata:
  name: poststarthook
data:
  poststart.sh: |
    #!/bin/bash
    export PGPASSWORD=node
    
    psql -U postgres -c "DROP DATABASE IF EXISTS chainlink_1_test"
    psql -U postgres -c "DROP DATABASE IF EXISTS chainlink_2_test"
    psql -U postgres -c "DROP DATABASE IF EXISTS chainlink_3_test"
    psql -U postgres -c "DROP DATABASE IF EXISTS chainlink_4_test"
    psql -U postgres -c "DROP DATABASE IF EXISTS chainlink_5_test"

    psql -U postgres -c "CREATE DATABASE chainlink_1_test"
    psql -U postgres -c "CREATE DATABASE chainlink_2_test"
    psql -U postgres -c "CREATE DATABASE chainlink_3_test"
    psql -U postgres -c "CREATE DATABASE chainlink_4_test"
    psql -U postgres -c "CREATE DATABASE chainlink_5_test"
