From 613b7308cd554ee43840c45ff6b8b1bf2e459411 Mon Sep 17 00:00:00 2001 From: Franklin Date: Wed, 3 May 2023 09:41:23 -0400 Subject: [PATCH] Changed bathrooms to use float4 instead of int --- migrations/7_unit_alter.sql | 1 + sqlx-data.json | 12 ++++++------ src/routes/main_router.rs | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 migrations/7_unit_alter.sql diff --git a/migrations/7_unit_alter.sql b/migrations/7_unit_alter.sql new file mode 100644 index 0000000..a91bd70 --- /dev/null +++ b/migrations/7_unit_alter.sql @@ -0,0 +1 @@ +ALTER TABLE public.unit ALTER COLUMN bathrooms TYPE float4 USING bathrooms::float4; diff --git a/sqlx-data.json b/sqlx-data.json index 98792d5..053138e 100644 --- a/sqlx-data.json +++ b/sqlx-data.json @@ -43,7 +43,7 @@ { "name": "bathrooms", "ordinal": 5, - "type_info": "Int2" + "type_info": "Float4" }, { "name": "area", @@ -401,7 +401,7 @@ { "name": "bathrooms", "ordinal": 5, - "type_info": "Int2" + "type_info": "Float4" }, { "name": "area", @@ -453,7 +453,7 @@ "Float8", "Varchar", "Int2", - "Int2", + "Float4", "Float4", "Text", "Text", @@ -787,7 +787,7 @@ { "name": "bathrooms", "ordinal": 5, - "type_info": "Int2" + "type_info": "Float4" }, { "name": "area", @@ -1477,7 +1477,7 @@ { "name": "bathrooms", "ordinal": 5, - "type_info": "Int2" + "type_info": "Float4" }, { "name": "area", @@ -1531,7 +1531,7 @@ "Float8", "Varchar", "Int2", - "Int2", + "Float4", "Float4", "Text", "Text", diff --git a/src/routes/main_router.rs b/src/routes/main_router.rs index b4fa312..b4ecf96 100644 --- a/src/routes/main_router.rs +++ b/src/routes/main_router.rs @@ -1,6 +1,7 @@ use std::{sync::Arc}; use actix_cors::Cors; +use actix_multipart::form::MultipartFormConfig; use actix_web::{ web::{self}, App, HttpServer, @@ -26,6 +27,7 @@ pub async fn start_all_routes(start_time: i64, db_conn: Arc) -> Result<( .app_data(client_state.clone()) .app_data(web::Data::new(db_conn.clone())) .app_data(aws_client.clone()) + .app_data(MultipartFormConfig::default().memory_limit(52_428_800)) .service( web::scope("/api") .service(