changed jdk on 25 springBoot on 3.5.6 and fix code
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
databaseChangeLog:
|
||||
- changeSet:
|
||||
id: 004-create-chats-messages
|
||||
author: you
|
||||
id: 014-create-chats
|
||||
author: krylov
|
||||
comment: >
|
||||
Таблица чатов. Раньше создавалась Hibernate (ddl-auto: update),
|
||||
поэтому changeset идемпотентен: если таблица уже есть — MARK_RAN.
|
||||
preConditions:
|
||||
onFail: MARK_RAN
|
||||
not:
|
||||
tableExists:
|
||||
tableName: chats
|
||||
changes:
|
||||
- createTable:
|
||||
tableName: chats
|
||||
@@ -14,4 +22,43 @@ databaseChangeLog:
|
||||
- addUniqueConstraint:
|
||||
tableName: chats
|
||||
columnNames: user_one_id, user_two_id
|
||||
constraintName: uq_chat_users
|
||||
constraintName: uq_chat_users
|
||||
|
||||
- changeSet:
|
||||
id: 014-chats-idx-participants
|
||||
author: krylov
|
||||
comment: >
|
||||
findAllByUserId ищет по (user_one_id = ? OR user_two_id = ?),
|
||||
без индексов это full scan по всем чатам.
|
||||
preConditions:
|
||||
onFail: MARK_RAN
|
||||
tableExists:
|
||||
tableName: chats
|
||||
not:
|
||||
indexExists:
|
||||
tableName: chats
|
||||
indexName: idx_chats_user_one
|
||||
changes:
|
||||
- createIndex:
|
||||
tableName: chats
|
||||
indexName: idx_chats_user_one
|
||||
columns:
|
||||
- column: { name: user_one_id }
|
||||
|
||||
- changeSet:
|
||||
id: 014-chats-idx-participants-two
|
||||
author: krylov
|
||||
preConditions:
|
||||
onFail: MARK_RAN
|
||||
tableExists:
|
||||
tableName: chats
|
||||
not:
|
||||
indexExists:
|
||||
tableName: chats
|
||||
indexName: idx_chats_user_two
|
||||
changes:
|
||||
- createIndex:
|
||||
tableName: chats
|
||||
indexName: idx_chats_user_two
|
||||
columns:
|
||||
- column: { name: user_two_id }
|
||||
|
||||
Reference in New Issue
Block a user