From 5be8610e8ace6a2cc11362da1d6993427489a8e3 Mon Sep 17 00:00:00 2001 From: "NG (Graham)" Date: Sun, 26 Jul 2026 17:52:16 -0400 Subject: [PATCH] Enable garage storage size reading on release builds for postgres --- rc_database/src/wrapper.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/rc_database/src/wrapper.rs b/rc_database/src/wrapper.rs index 02bcb79..013a79f 100644 --- a/rc_database/src/wrapper.rs +++ b/rc_database/src/wrapper.rs @@ -256,13 +256,6 @@ impl Database { let size = match self.orm.as_ref() { // TODO implement support in other databases sea_orm::DatabaseConnection::SqlxPostgresPoolConnection(_) => { - - #[cfg(debug_assertions)] - { - /*let query = sea_orm::sea_query::raw_query!( - PostgresQueryBuilder, - r#"select sum(pg_column_size(g.*)) from garages g where g.user_id = $user_id;"# - );*/ struct PgColumnSize; impl sea_orm::sea_query::Iden for PgColumnSize { fn unquoted(&self, s: &mut dyn std::fmt::Write) { @@ -280,12 +273,6 @@ impl Database { .one(self.orm.as_ref()) .await?; result.map(|x| x.column) - } - #[cfg(not(debug_assertions))] - { - let _ = user_id; - None - } }, _ => None, };