Skip to content

.env connection string discovery is not explained #813

@lesmo

Description

@lesmo

Given the docs, I would assume my PSQL connection strings would show up in the UI but they don't:

Image

This zero-cofig auto discovery seems to load all .env files in all folders in a VSCode Workspace, and then build the connections. If each folder under a workspace has a .env and each folder use the same env var name, it will overwrite all others?

Image

In this example, the last .env is the one in the 4th folder and it seems to be the one used by DBCode and completely ignoring all previous ones. The .env on that folder does have the discovered Redis connection but, strangely, although it has a DATABASE_URL connection it doesn't show up:

# .env 1st folder
DATABASE_URL=postgres://pguser:pgpassword@localhost:5432/db
DATABASE_TEST_URL=postgres://pguser:pgpassword@localhost:5432/db
REDIS_URL=redis://localhost:6379
# .env 4th folder
DATABASE_URL=postgres://pguser:pgpassword@localhost:5432/db
DATABASE_TEST_URL=sqlite::memory:

It would seem to me that DBCode is not recognizing the postgres protocol?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions