# Migrations re-run evidence, 2026-10-29T15:36:22Z
$ docker compose run --rm migrate
skip  0001_init
$ select version, checksum, applied_at from schema_migrations
  version  |     checksum     |          applied_at           
-----------+------------------+-------------------------------
 0001_init | b0f6ac0177a064da | 2026-10-29 15:27:31.980855+00
(1 row)

$ \d messages
                             Table "public.messages"
   Column   |           Type           | Collation | Nullable |      Default      
------------+--------------------------+-----------+----------+-------------------
 id         | uuid                     |           | not null | gen_random_uuid()
 chat_id    | uuid                     |           | not null | 
 sender_id  | uuid                     |           | not null | 
 text       | text                     |           | not null | 
 created_at | timestamp with time zone |           | not null | clock_timestamp()
Indexes:
    "messages_pkey" PRIMARY KEY, btree (id)
    "messages_chat_created_id_idx" btree (chat_id, created_at, id)
Check constraints:
    "messages_text_check" CHECK (char_length(text) >= 1 AND char_length(text) <= 4000)
Foreign-key constraints:
    "messages_sender_is_member" FOREIGN KEY (chat_id, sender_id) REFERENCES chat_members(chat_id, user_id)

