Skip to content

[Bug] Init.sql CREATE TABLE access_token twice #246

@berkes

Description

@berkes

Description

the agent_application/docker/db/init.sql has two instances of CREATE TABLE access_token. They create the same table, but this will most likely fail on creating or booting the postgres in the docker compose setup.

Hardware Specification

Operating system: docker(compose)
RAM: na
Cores: na
Device: na

Steps to Reproduce the Bug

  1. Nuke all docker resources and persisted volumes. E.g. "docker system prune"
  2. Run the docker compose as per the README.

Or, just read the init.sql file :)

grep "CREATE TABLE" agent_application/docker/db/init.sql | sort | uniq -c
      2 CREATE TABLE access_token
      1 CREATE TABLE all_access_tokens
      1 CREATE TABLE all_authorization_codes
      1 CREATE TABLE all_authorization_requests
      1 CREATE TABLE all_clients
      1 CREATE TABLE all_connections
      1 CREATE TABLE all_credentials
      1 CREATE TABLE all_documents
      1 CREATE TABLE all_holder_credentials
      1 CREATE TABLE all_oauth2_authorization_requests
      1 CREATE TABLE all_offers
      1 CREATE TABLE all_presentations
      1 CREATE TABLE all_received_offers
      1 CREATE TABLE all_services
      1 CREATE TABLE all_templates
      1 CREATE TABLE authorization_code
      1 CREATE TABLE authorization_request
      1 CREATE TABLE client
      1 CREATE TABLE connection
      1 CREATE TABLE credential
      1 CREATE TABLE document
      1 CREATE TABLE events
      1 CREATE TABLE holder_credential
      1 CREATE TABLE oauth2_authorization_request
      1 CREATE TABLE offer
      1 CREATE TABLE pre_authorized_code
      1 CREATE TABLE presentation
      1 CREATE TABLE profile
      1 CREATE TABLE received_offer
      1 CREATE TABLE server_config
      1 CREATE TABLE service
      1 CREATE TABLE template

Expected Behaviour

tables should be created.

Actual Behaviour

Relation already exists

Errors

Relation already exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions