realtor-lp-backend/migrations/2_property.sql
2023-05-03 13:35:33 -04:00

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
);