realtor-lp-backend/migrations/2_property.sql

21 lines
631 B
MySQL
Raw Normal View History

2023-05-03 16:59:54 +00:00
CREATE TABLE IF NOT EXISTS "property" (
id UUID PRIMARY KEY,
project_id UUID,
realtor_id UUID NOT NULL,
media TEXT NOT NULL,
2023-05-03 17:35:33 +00:00
property_type VARCHAR NOT NULL,
property_sale_type VARCHAR NOT NULL,
country VARCHAR NOT NULL,
city VARCHAR NOT NULL,
district VARCHAR NOT NULL,
order_index INT NOT NULL,
thumbnail_format VARCHAR NOT NULL,
2023-05-03 17:35:33 +00:00
price_usd FLOAT8 NOT NULL,
rooms SMALLINT NOT NULL,
bathrooms FLOAT4 NOT NULL,
area FLOAT4 NOT NULL,
parking_spots SMALLINT NOT NULL,
2023-05-03 17:35:33 +00:00
admin_tag VARCHAR,
2023-05-03 16:59:54 +00:00
time_created TIMESTAMPTZ NOT NULL,
last_updated TIMESTAMPTZ NOT NULL
);