1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-24 23:01:05 +03:00

Remove the dependency on sqlx in the config crate

This commit is contained in:
Quentin Gliech
2022-12-15 14:44:20 +01:00
parent 306b71baf5
commit ee42250660
14 changed files with 130 additions and 137 deletions

View File

@@ -17,6 +17,8 @@ use clap::Parser;
use mas_config::DatabaseConfig;
use mas_storage::MIGRATOR;
use crate::util::database_from_config;
#[derive(Parser, Debug)]
pub(super) struct Options {
#[command(subcommand)]
@@ -32,7 +34,7 @@ enum Subcommand {
impl Options {
pub async fn run(&self, root: &super::Options) -> anyhow::Result<()> {
let config: DatabaseConfig = root.load_config()?;
let pool = config.connect().await?;
let pool = database_from_config(&config).await?;
// Run pending migrations
MIGRATOR