Files
mtusi2026lab2/migrations/002_chats.sql
T
Artem 79630e6c8c
Skeleton contracts / contracts (pull_request) Blocked by required conditions
ЛР 2: Сохранение сессий PostgreSQL
2026-12-01 22:02:33 +03:00

6 lines
195 B
SQL

CREATE TABLE chats (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title TEXT NOT NULL CHECK (char_length(title) BETWEEN 1 AND 100),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);