added chats with another users

This commit is contained in:
SlimusMinus
2026-06-22 01:08:47 +03:00
parent 194b7efb8a
commit 236d00f2f9
19 changed files with 433 additions and 177 deletions

View File

@@ -0,0 +1,17 @@
databaseChangeLog:
- changeSet:
id: 004-create-chats-messages
author: you
changes:
- createTable:
tableName: chats
columns:
- column: { name: id, type: BIGSERIAL, constraints: { primaryKey: true } }
- column: { name: user_one_id, type: BIGINT, constraints: { nullable: false } }
- column: { name: user_two_id, type: BIGINT, constraints: { nullable: false } }
- column: { name: post_id, type: BIGINT }
- column: { name: created_at, type: TIMESTAMP, constraints: { nullable: false } }
- addUniqueConstraint:
tableName: chats
columnNames: user_one_id, user_two_id
constraintName: uq_chat_users