aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.sqlx/query-8911a00307267a402475c286f765d23f1e3b87538591837bfe41fff03e7313dd.json15
-rw-r--r--Cargo.toml5
-rw-r--r--lib/api-config/src/schema/mod.rs13
3 files changed, 26 insertions, 7 deletions
diff --git a/.sqlx/query-8911a00307267a402475c286f765d23f1e3b87538591837bfe41fff03e7313dd.json b/.sqlx/query-8911a00307267a402475c286f765d23f1e3b87538591837bfe41fff03e7313dd.json
new file mode 100644
index 0000000..99d50b9
--- /dev/null
+++ b/.sqlx/query-8911a00307267a402475c286f765d23f1e3b87538591837bfe41fff03e7313dd.json
@@ -0,0 +1,15 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "delete from transaction_schema where type = $1 and version = $2",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Text",
+ "Text"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "8911a00307267a402475c286f765d23f1e3b87538591837bfe41fff03e7313dd"
+}
diff --git a/Cargo.toml b/Cargo.toml
index 05332e0..ee33a0d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,3 +32,8 @@ features = ["macros", "migrate", "postgres"]
[profile.dev.package.sqlx-macros]
opt-level = 3
+
+[profile.release]
+lto = true
+strip = true
+codegen-units = 1
diff --git a/lib/api-config/src/schema/mod.rs b/lib/api-config/src/schema/mod.rs
index b058060..4e68129 100644
--- a/lib/api-config/src/schema/mod.rs
+++ b/lib/api-config/src/schema/mod.rs
@@ -74,13 +74,12 @@ impl SchemaDriver for AppState {
kind: impl AsRef<str> + Send + Sync,
version: impl AsRef<str> + Send + Sync,
) -> Result<(), crate::ConfigurationError> {
- // sqlx::query!("delete * from transaction_schema where type = $1 and version $2",
- // name.as_ref(),
- // version.as_ref(),
- // )
- // .execute(&self.database)
- // .await
- // .map_err(|e| e.into())
+ sqlx::query!("delete from transaction_schema where type = $1 and version = $2",
+ kind.as_ref(),
+ version.as_ref(),
+ )
+ .execute(&self.database)
+ .await?;
Ok(())
}
}