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

18 lines
498 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,
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
);