From 3eaba1e8f5b13cf42c200d10795b0787ecd9e884 Mon Sep 17 00:00:00 2001 From: sjaanus Date: Thu, 8 Feb 2024 10:36:47 +0200 Subject: [PATCH] feat: add partial index on client_applications annouced FALSE --- ...64033-client-applications-announced-index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/migrations/20240207164033-client-applications-announced-index.js diff --git a/src/migrations/20240207164033-client-applications-announced-index.js b/src/migrations/20240207164033-client-applications-announced-index.js new file mode 100644 index 000000000000..1069e5f2ad58 --- /dev/null +++ b/src/migrations/20240207164033-client-applications-announced-index.js @@ -0,0 +1,17 @@ +'use strict'; + +exports.up = function(db, cb) { + db.runSql( + ` + CREATE INDEX idx_client_applications_announced_false ON client_applications (announced) + WHERE announced = FALSE; + `, + cb, + ); +}; + +exports.down = function(db, cb) { + db.runSql(` + DROP INDEX idx_client_applications_announced_false; + `, cb); +};