From 71dde006edc1076f7c5affd22a3747d68bd323ad Mon Sep 17 00:00:00 2001 From: Franklin Date: Wed, 3 May 2023 13:35:33 -0400 Subject: [PATCH] Updated all migrations --- migrations/1_realtor.sql | 6 +++--- migrations/2_property.sql | 10 ++++++++++ migrations/5_project.sql | 11 ++++++++++- src/routes/mod.rs | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/migrations/1_realtor.sql b/migrations/1_realtor.sql index 6c5f08d..c8d5913 100644 --- a/migrations/1_realtor.sql +++ b/migrations/1_realtor.sql @@ -2,11 +2,11 @@ CREATE TABLE IF NOT EXISTS "realtor" ( id UUID PRIMARY KEY, name VARCHAR NOT NULL, bio VARCHAR NOT NULL, - phone_number VARCHAR, - email VARCHAR NOT NULL, + phone_number VARCHAR NOT NULL, + email VARCHAR, profile_picture_url VARCHAR NOT NULL, show_projects boolean NOT NULL, - shortcode VARCHAR, + shortcode VARCHAR NOT NULL, remax_agent_id INT, time_created TIMESTAMPTZ NOT NULL, last_updated TIMESTAMPTZ NOT NULL diff --git a/migrations/2_property.sql b/migrations/2_property.sql index 418ee22..7d5b6a1 100644 --- a/migrations/2_property.sql +++ b/migrations/2_property.sql @@ -3,6 +3,16 @@ CREATE TABLE IF NOT EXISTS "property" ( project_id UUID, realtor_id UUID NOT NULL, media TEXT NOT NULL, + property_type VARCHAR NOT NULL, + property_sale_type VARCHAR NOT NULL, + country VARCHAR, + city VARCHAR, + district VARCHAR, + price_usd FLOAT8 NOT NULL, + rooms SMALLINT NOT NULL, + bathrooms FLOAT4 NOT NULL, + area FLOAT4 NOT NULL, + admin_tag VARCHAR, time_created TIMESTAMPTZ NOT NULL, last_updated TIMESTAMPTZ NOT NULL ); \ No newline at end of file diff --git a/migrations/5_project.sql b/migrations/5_project.sql index 90604c8..757caf6 100644 --- a/migrations/5_project.sql +++ b/migrations/5_project.sql @@ -4,7 +4,16 @@ CREATE TABLE IF NOT EXISTS "project" ( description TEXT NOT NULL, realtor_id UUID NOT NULL, media TEXT NOT NULL, - order_index INTEGER, + project_condition VARCHAR NOT NULL, + project_type VARCHAR NOT NULL, + project_state VARCHAR NOT NULL, + country VARCHAR NOT NULL, + city VARCHAR NOT NULL, + district VARCHAR NOT NULL, + admin_tag VARCHAR, + floors SMALLINT, + finish_date TIMESTAMP, + order_index INTEGER NOT NULL, time_created TIMESTAMPTZ NOT NULL, last_updated TIMESTAMPTZ NOT NULL ); \ No newline at end of file diff --git a/src/routes/mod.rs b/src/routes/mod.rs index e69de29..17723fe 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -0,0 +1 @@ +pub mod main_router; \ No newline at end of file