Files
delivery-tracker/backend/internal/db/migrations/000001_create_deliveries_table.up.sql
Egor Pozharov 4e0899d3ce chore: restructure project into backend and frontend folders
- Move all frontend code to frontend/ directory
- Add backend/ with Go project structure (cmd, internal, pkg)
- Add docker-compose.yml for orchestration
2026-04-14 13:14:28 +06:00

14 lines
621 B
SQL

CREATE TABLE deliveries (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
date date NOT NULL, -- хранить как date, отдавать как DD-MM-YYYY
pickup_location varchar(20) NOT NULL, -- warehouse|symbat|nursaya|galaktika
product_name text NOT NULL,
address text NOT NULL,
phone varchar(30) NOT NULL,
additional_phone varchar(30),
has_elevator boolean NOT NULL DEFAULT false,
comment text,
status varchar(20) NOT NULL DEFAULT 'new', -- new|delivered
created_at timestamptz DEFAULT now(),
updated_at timestamptz DEFAULT now()
);