projects
/
GitHub
/
WoltLab
/
blacklist.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4460556
)
Add INDEX for lastSeen column
author
Tim Düsterhus
<duesterhus@woltlab.com>
Mon, 28 Sep 2020 15:00:29 +0000
(17:00 +0200)
committer
Tim Düsterhus
<duesterhus@woltlab.com>
Mon, 28 Sep 2020 15:00:29 +0000
(17:00 +0200)
src/blacklist.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/blacklist.ts
b/src/blacklist.ts
index acd9aae63f54ac361a7c33726f0e101fce47f9d8..2c8439eca729c226561e23ac8eaeee76b54ee355 100644
(file)
--- a/
src/blacklist.ts
+++ b/
src/blacklist.ts
@@
-23,6
+23,12
@@
export class Blacklist {
this.tableName
} (hash);`,
);
+
+ await this.db.exec(
+ `CREATE INDEX IF NOT EXISTS lastSeen_${this.type} ON ${
+ this.tableName
+ } (lastSeen);`,
+ );
}
public async upsert(buffer: Buffer): Promise<void> {