realtor-lp-backend/migrations/5_project.sql
2023-05-03 13:36:55 -04:00

19 lines
565 B
SQL

CREATE TABLE IF NOT EXISTS "project" (
id UUID PRIMARY KEY,
title VARCHAR,
description TEXT NOT NULL,
realtor_id UUID NOT NULL,
media TEXT NOT NULL,
project_condition VARCHAR NOT NULL,
project_type VARCHAR NOT NULL,
project_state VARCHAR NOT NULL,
country VARCHAR NOT NULL,
city VARCHAR NOT NULL,
district VARCHAR NOT NULL,
admin_tag VARCHAR,
floors SMALLINT NOT NULL,
finish_date DATE NOT NULL,
order_index INTEGER NOT NULL,
time_created TIMESTAMPTZ NOT NULL,
last_updated TIMESTAMPTZ NOT NULL
);