forked from mtusi2026/mtusi2026lab2
36 lines
2.1 KiB
Plaintext
36 lines
2.1 KiB
Plaintext
--- первый запуск (из логов сервиса migrate) ---
|
|
migrate-1 | apply 0001_init
|
|
migrate-1 | migrations complete: 1 file(s)
|
|
--- повторный запуск ---
|
|
Container mtusi-lab2-postgres-1 Running
|
|
Container mtusi-lab2-postgres-1 Waiting
|
|
Container mtusi-lab2-postgres-1 Healthy
|
|
Container mtusi-lab2-migrate-run-d04acc691283 Creating
|
|
Container mtusi-lab2-migrate-run-d04acc691283 Created
|
|
skip 0001_init
|
|
migrations complete: 1 file(s)
|
|
--- схема ---
|
|
Table "public.messages"
|
|
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
|
|
------------+--------------------------+-----------+----------+---------+----------+-------------+--------------+-------------
|
|
id | uuid | | not null | | plain | | |
|
|
chat_id | uuid | | not null | | plain | | |
|
|
sender_id | uuid | | not null | | plain | | |
|
|
text | bytea | | not null | | extended | | |
|
|
created_at | timestamp with time zone | | not null | | plain | | |
|
|
Indexes:
|
|
"messages_pkey" PRIMARY KEY, btree (id)
|
|
"messages_history_idx" btree (chat_id, created_at, id)
|
|
Check constraints:
|
|
"messages_text_size" CHECK (octet_length(text) >= 1 AND octet_length(text) <= 16000)
|
|
Foreign-key constraints:
|
|
"messages_chat_id_fkey" FOREIGN KEY (chat_id) REFERENCES chats(id) ON DELETE CASCADE
|
|
"messages_sender_id_fkey" FOREIGN KEY (sender_id) REFERENCES users(id) ON DELETE RESTRICT
|
|
Access method: heap
|
|
|
|
version | checksum | applied_at
|
|
-----------+------------------------------------------------------------------+-------------------------------
|
|
0001_init | 4fd0a8c68a5cffd3ae67a21646eb1928477d18b8716e68c1220469d858ccb9c1 | 2026-10-19 15:50:30.673311+00
|
|
(1 row)
|
|
|