Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Invalid error "There is no database name as part of the url path" for a db url postgres:dbname when running sea-orm-cli generate entity #2647

@julienw

Description

@julienw

Description

I use this string to reference the postgresql connection: postgres:dbname. This works fine everywhere, but not with sea-orm-cli generate entity where I have to use postgres:///dbname instead.

The error I get is:

There is no database name as part of the url path: postgres:dbname

Steps to Reproduce

  1. Run sea-orm-cli generate entity -o directory -u postgres:dbname

Expected Behavior

sea-orm-cli can connect to the db just fine.

Actual Behavior

I get the error described above.

Reproduces How Often

Always reproducible.

Workarounds

I have specified -u postgres:///dbname instead, which worked.

Reproducible Example

(I don't think that's needed, given this is reproducible without even a proper db being present)

Versions

│ └── sea-orm v1.1.13
│ ├── sea-orm-macros v1.1.13 (proc-macro)
│ │ ├── sea-bae v0.2.1 (proc-macro)
│ ├── sea-query v0.32.6
│ │ ├── sea-query-derive v0.4.3 (proc-macro)
│ ├── sea-query-binder v0.7.0
│ │ ├── sea-query v0.32.6 ()
│ └── sea-orm-migration v1.1.13
│ ├── sea-orm v1.1.13 (
)
│ ├── sea-orm-cli v1.1.13
│ ├── sea-schema v0.16.2
│ │ ├── sea-query v0.32.6 ()
│ │ ├── sea-query-binder v0.7.0 (
)
│ │ ├── sea-schema-derive v0.3.0 (proc-macro)
├── sea-orm v1.1.13 (*)

Using Linux and PostgreSQL.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions