mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #840] about migration && schema.rs path #590
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#590
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @insub on GitHub (Jan 31, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/840
Subject of the issue
I use sqlite db on development and mysql db on production.
If i run
diesel migration generate <name>(like bitwarden_rs's wiki)the migration file generate and put in "migrations/" , but not "migrations/sqlite",
so i have to run
diesel migration generate <name> --migration-dir migrations/sqliteThe same happens when you execute build, the schema.rs generate and put in "src/db/", not "src/db/schemas/sqlite"
Your environment
MacOS 10.15.3
v1.13.1
Steps to reproduce
diesel migration generate <name>cargo run --features sqliteExpected behaviour
schema.rs put in "src/db/schemas/sqlite"
Actual behaviour
schema.rs put in "src/db"
@dani-garcia commented on GitHub (Feb 4, 2020):
Yeah, it's one of the quirks of trying to work with a SQL library that isn't very focused in supporting multiple databases simultaneously, you'll have to handle the moving files to their respective folders and also generating those different schemas and migrations per database. I don't think there's much we can do about it