feat: with single migrations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
924bcf8c8c
commit
c3f9613541
@ -29,14 +29,12 @@ impl CuddleFileExt for RustService {
|
|||||||
if let Some(components) = &cuddle_file.components {
|
if let Some(components) = &cuddle_file.components {
|
||||||
s = if let Some(database) = &components.database {
|
s = if let Some(database) = &components.database {
|
||||||
match database {
|
match database {
|
||||||
CuddleDatabase::Enabled(true) => s.with_sqlx().with_sqlx_migrations(
|
CuddleDatabase::Enabled(true) => s.with_sqlx_migrations(
|
||||||
PathBuf::from("crates")
|
PathBuf::from("crates")
|
||||||
.join(&cuddle_file.vars.service)
|
.join(&cuddle_file.vars.service)
|
||||||
.join("migrations/crdb"),
|
.join("migrations/crdb"),
|
||||||
),
|
),
|
||||||
CuddleDatabase::Values { migrations } => {
|
CuddleDatabase::Values { migrations } => s.with_sqlx_migrations(migrations),
|
||||||
s.with_sqlx().with_sqlx_migrations(migrations)
|
|
||||||
}
|
|
||||||
CuddleDatabase::Enabled(false) | CuddleDatabase::Default {} => s,
|
CuddleDatabase::Enabled(false) | CuddleDatabase::Default {} => s,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user