SeaQL / SeaQL/sea-orm

`sea-orm-migration` CLI shouldn't always connect to a database

Open
#2,045 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Category:enhancement
Dominant language
Rust
Stars
9.9k
Forks
734
Avg merge
6h 36m
Merged PRs (30d)
8

Description

Description

When using the migration CLI to generate a new migration, it fails because I haven't setup the SSH tunnel to the database configured. This shouldn't happen since generating new migrations should not require a database connection.

Steps to Reproduce

  1. Run the migration CLI to generate a new migration e.g. cargo run -p migration -- generate "update table"
Expected Behavior

migration gets generated successfully

Actual Behavior

fails with some error like Fail to acquire database connection: Conn(SqlxError(PoolTimedOut))

Reproduces How Often

always

Workarounds

just setup the ssh tunnel to the database

Reproducible Example

Versions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running cargo run -p migration -- generate "update table" without the configured SSH tunnel, then trace the migration CLI path that acquires the database connection. Done means the migration file is generated successfully without connecting to the database; the issue does not name a source file or test to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.