added chats with another users
This commit is contained in:
17
src/main/resources/db/changelog/create/006-create-chats.yaml
Normal file
17
src/main/resources/db/changelog/create/006-create-chats.yaml
Normal 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
|
||||
Reference in New Issue
Block a user