chore: simplify delete namespace sql query
@@ -684,15 +684,8 @@ WHERE name = $1;
// note that there is a uniqueness constraint on the name column in the DB
sqlx::query(
r#"
-WITH namespace_id as (
- SELECT id
- FROM namespace
- WHERE name = $1
- LIMIT 1
-)
DELETE FROM namespace
-WHERE id = (SELECT id FROM namespace_id)
-RETURNING id;
+WHERE name = $1;
"#,
)
.bind(name)
