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

21 lines
631 B
SQL

CREATE TABLE IF NOT EXISTS "property" (
id UUID PRIMARY KEY,
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 NOT NULL,
city VARCHAR NOT NULL,
district VARCHAR NOT NULL,
order_index INT NOT NULL,
thumbnail_format VARCHAR NOT NULL,
price_usd FLOAT8 NOT NULL,
rooms SMALLINT NOT NULL,
bathrooms FLOAT4 NOT NULL,
area FLOAT4 NOT NULL,
parking_spots SMALLINT NOT NULL,
admin_tag VARCHAR,
time_created TIMESTAMPTZ NOT NULL,
last_updated TIMESTAMPTZ NOT NULL
);