Replies: 1 comment
-
Improvements to our documentation is always welcome, as we unfortunately do not have the capacity to document all stuff in detail. PR's that improve the documentation are always welcome. For the cli there is some inline documentation in the code: Lines 253 to 262 in c794c3e For the embed_migration! macro the master branch documentation already contains some details.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Better document how
diesel_cli
searches and created migrations and how it interacts with Cargo workspacesBasically i could not find any documentation of how
diesel_cli
actually searches for aCargo.toml
and how consistent it is and also how it interacts with Cargo WorkspacesFor Example:
diesel_cli
handle being in the cargo workspace root (like/
)diesel_cli
handle being in a sub-directory of a workspace / normal-project (like/target
)diesel_cli
handle being in a workspace crate (like/crates/library
)also,
diesel_migrations::embed_migrations
should link to wherediesel_cli
describes how it searchesMy use-case:
i have a mono-repo project which uses cargo-workspaces, where the structure is:
/Cargo.toml
- defining the workspace/crates/bin/Cargo.toml
- defining a binary crate/crates/lib/Cargo.toml
- defining a library crate/crates/lib/migrations/
- all migrations are in the lib crate (created withdiesel setup
while CWD was/crates/lib
)and i would like to include the migrations in the library crate with
diesel_migrations::embed_migrations
, but i am unsure of what path i need to input:lib
crate'sCargo.toml
, orCargo.toml
, orNote: from my testing, in this case my answer is "i need to input relative to the
lib
crate'sCargo.toml
" (which it seems to auto-detect)Beta Was this translation helpful? Give feedback.
All reactions