mirror of
https://github.com/status-im/status-go.git
synced 2025-01-10 14:47:06 +00:00
dd49e604d4
This property is useful for clients to know when a channel or chat was joined so they can use that to calculate the order of channels and chats shown in applications. Changes include a new joined property on the Chat struct, as well as adjustments in the persistence layer to retreive and update chat data in the database. In addition there's a migration script that alters the existing chat table to introduce a new column for the joined field. It also updates all existing rows in the database to set `joined` to `0`.
4 lines
101 B
SQL
4 lines
101 B
SQL
ALTER TABLE chats ADD COLUMN joined INT DEFAULT 0;
|
|
UPDATE chats SET joined = 0 WHERE joined = NULL;
|
|
|