Skip to content

Commit

Permalink
sql: fix overlapping migration number after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Oct 24, 2023
1 parent c1eb33c commit 0d23bf1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/sql/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,20 +730,21 @@ CREATE INDEX smtp_messageid ON imap(rfc724_mid);
)
.await?;
}

// Add is_bot column to contacts table with default false.
if dbversion < 102 {
sql.execute_migration(
"CREATE TABLE download (
msg_id INTEGER NOT NULL -- id of the message stub in msgs table
)",
"ALTER TABLE contacts ADD COLUMN is_bot INTEGER NOT NULL DEFAULT 0",
102,
)
.await?;
}

// Add is_bot column to contacts table with default false.
if dbversion < 102 {
if dbversion < 103 {
sql.execute_migration(
"ALTER TABLE contacts ADD COLUMN is_bot INTEGER NOT NULL DEFAULT 0",
"CREATE TABLE download (
msg_id INTEGER NOT NULL -- id of the message stub in msgs table
)",
102,
)
.await?;
Expand Down

0 comments on commit 0d23bf1

Please sign in to comment.