Skip to content

Commit

Permalink
Create index on creation_time only if it doesn't exist.
Browse files Browse the repository at this point in the history
Since index creation will fail if index already exists.
  • Loading branch information
G8XSU committed Dec 11, 2024
1 parent 31026d6 commit 54cf951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldk-server/src/io/sqlite_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl SqliteStore {
})?;

let index_creation_time_sql = format!(
"CREATE INDEX idx_creation_time ON {} (creation_time);",
"CREATE INDEX IF NOT EXISTS idx_creation_time ON {} (creation_time);",
paginated_kv_table_name
);

Expand Down

0 comments on commit 54cf951

Please sign in to comment.