jl-backend-rs/migrations/4_unit.sql

15 lines
377 B
SQL

CREATE TABLE IF NOT EXISTS "unit" (
id UUID PRIMARY KEY,
project_id UUID NOT NULL,
price_usd FLOAT8 NOT NULL,
unit_type VARCHAR NOT NULL,
rooms SMALLINT NOT NULL,
bathrooms SMALLINT NOT NULL,
area FLOAT4 NOT NULL,
description TEXT NOT NULL,
media TEXT NOT NULL,
admin_tag VARCHAR,
time_created TIMESTAMPTZ NOT NULL,
last_updated TIMESTAMPTZ NOT NULL
);