Skip to content

Commit 3a929fd

Browse files
committed
Add SQL migration
1 parent 8ec0982 commit 3a929fd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/sql/migrations.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,19 @@ CREATE INDEX msgs_status_updates_index2 ON msgs_status_updates (uid);
11381138
.await?;
11391139
}
11401140

1141+
inc_and_check(&mut migration_version, 128)?;
1142+
if dbversion < migration_version {
1143+
sql.execute_migration(
1144+
"ALTER TABLE chats_contacts
1145+
ADD COLUMN timestamp NOT NULL DEFAULT 0;
1146+
ALTER TABLE chats_contacts
1147+
ADD COLUMN is_tombstone NOT NULL DEFAULT FALSE;
1148+
",
1149+
migration_version,
1150+
)
1151+
.await?;
1152+
}
1153+
11411154
let new_version = sql
11421155
.get_raw_config_int(VERSION_CFG)
11431156
.await?

0 commit comments

Comments
 (0)