Skip to content

Commit

Permalink
fixed the hstore migration
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Jul 11, 2024
1 parent 5b28cea commit 069125d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
create extension IF NOT EXISTS hstore
-- Add down migration script here
DROP EXTENSION IF EXISTS hstore
3 changes: 2 additions & 1 deletion server/main-api/migrations/20240709000000_init_hstore.up.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DROP EXTENSION IF EXISTS hstore
-- Add up migration script here
create extension IF NOT EXISTS hstore
4 changes: 2 additions & 2 deletions server/main-api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async fn health_status_handler(data: web::Data<AppData>) -> HttpResponse {
Some(hash) => format!("https://github.com/TUM-Dev/navigatum/tree/{hash}"),
None => "unknown commit hash, probably running in development".to_string(),
};
return match data.pool.execute("SELECT 1").await {
match data.pool.execute("SELECT 1").await {
Ok(_) => HttpResponse::Ok()
.content_type("text/plain")
.body(format!("healthy\nsource_code: {github_link}")),
Expand All @@ -66,7 +66,7 @@ async fn health_status_handler(data: web::Data<AppData>) -> HttpResponse {
.content_type("text/plain")
.body(format!("unhealthy\nsource_code: {github_link}"))
}
};
}
}

fn connection_string() -> String {
Expand Down

0 comments on commit 069125d

Please sign in to comment.