sea-orm-cli cannot open SQLite db.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.9k
- Forks
- 734
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 8
Description
Description
Hello,
i'm running into this issue where sea-orm-cli does not seem to be able to open my DB file.
I'm generating the db and populating it via a programmatic migration so that part of the API seems fine.
Any idea?
Steps to Reproduce
- Generate a sqlite db.
- Interact with it to make sure seaql can pick it up
let db = db::create_db_conn().await?; //
let _ = SchemaManager::new(&db); // <- This all work
Migrator::refresh(&db).await?; //
- Try to generate entities with the cli
sea-orm-cli generate entity -u sqlite://C:\\Users\\jury\\AppData\\Roaming\\skaya\\fluffy-waffle\\data\\db_debug.sqlite -o src/entities --with-serde both
Expected Behavior
Entities are being generated and populated into src/entities
Actual Behavior
Connecting to SQLite ...
error returned from database: (code: 14) unable to open database file
Reproduces How Often
Always
Workarounds
Haven't found any workaround so far.
Versions
sea-orm = { version = "0.12.15", features = ["sqlx-sqlite", "runtime-async-std-native-tls"] }
sea-orm-migration = "0.12.15"
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 reproducing the sea-orm-cli generate entity command with the Windows SQLite URL shown, then compare its connection handling with the working programmatic migration connection. Check how the CLI parses SQLite paths and document or correct the difference. Done when the command opens the database and generates entities in src/entities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- cli, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100