feat: with single migrations
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-04-05 22:55:07 +02:00
parent 924bcf8c8c
commit c3f9613541
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394

View File

@ -29,14 +29,12 @@ impl CuddleFileExt for RustService {
if let Some(components) = &cuddle_file.components {
s = if let Some(database) = &components.database {
match database {
CuddleDatabase::Enabled(true) => s.with_sqlx().with_sqlx_migrations(
CuddleDatabase::Enabled(true) => s.with_sqlx_migrations(
PathBuf::from("crates")
.join(&cuddle_file.vars.service)
.join("migrations/crdb"),
),
CuddleDatabase::Values { migrations } => {
s.with_sqlx().with_sqlx_migrations(migrations)
}
CuddleDatabase::Values { migrations } => s.with_sqlx_migrations(migrations),
CuddleDatabase::Enabled(false) | CuddleDatabase::Default {} => s,
}
} else {