`sea-orm-migration` CLI shouldn't always connect to a database
Nobody has claimed this yet.
- 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
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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