feat(room): read model_id in search results, register m20260420_000003 migration
This commit is contained in:
parent
3c8e9e3674
commit
d4b0a9ae67
@ -1,5 +1,7 @@
|
|||||||
pub use sea_orm_migration::prelude::*;
|
pub use sea_orm_migration::prelude::*;
|
||||||
|
|
||||||
|
mod m20260420_000003_add_model_id_to_room_message;
|
||||||
|
|
||||||
pub async fn execute_sql(manager: &SchemaManager<'_>, sql: &str) -> Result<(), DbErr> {
|
pub async fn execute_sql(manager: &SchemaManager<'_>, sql: &str) -> Result<(), DbErr> {
|
||||||
for stmt in split_sql_statements(sql) {
|
for stmt in split_sql_statements(sql) {
|
||||||
if stmt.is_empty() {
|
if stmt.is_empty() {
|
||||||
|
|||||||
@ -119,6 +119,7 @@ impl RoomService {
|
|||||||
room: row.try_get::<RoomId>("", "room").unwrap_or_default(),
|
room: row.try_get::<RoomId>("", "room").unwrap_or_default(),
|
||||||
sender_type,
|
sender_type,
|
||||||
sender_id: row.try_get::<Option<UserId>>("", "sender_id").ok().flatten(),
|
sender_id: row.try_get::<Option<UserId>>("", "sender_id").ok().flatten(),
|
||||||
|
model_id: row.try_get::<Option<Uuid>>("", "model_id").ok().flatten(),
|
||||||
thread: row.try_get::<Option<RoomThreadId>>("", "thread").ok().flatten(),
|
thread: row.try_get::<Option<RoomThreadId>>("", "thread").ok().flatten(),
|
||||||
in_reply_to: row.try_get::<Option<MessageId>>("", "in_reply_to").ok().flatten(),
|
in_reply_to: row.try_get::<Option<MessageId>>("", "in_reply_to").ok().flatten(),
|
||||||
content: row.try_get::<String>("", "content").unwrap_or_default(),
|
content: row.try_get::<String>("", "content").unwrap_or_default(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user