From 39398000688b727109dbb026d853fa15d33e9499 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 27 Sep 2020 08:39:18 -0400 Subject: [PATCH] [Database v0008b] Add missing column in fulltext index - Add minimal SQL query to downgrade SQL script to avoid empty query errors --- src/sql/migrations/down/0001.sql | 2 ++ src/sql/migrations/down/0006.sql | 2 ++ src/sql/migrations/down/0007.sql | 2 +- src/sql/migrations/up/0008.sql | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sql/migrations/down/0001.sql b/src/sql/migrations/down/0001.sql index e69de29..b325142 100644 --- a/src/sql/migrations/down/0001.sql +++ b/src/sql/migrations/down/0001.sql @@ -0,0 +1,2 @@ +BEGIN; +COMMIT; diff --git a/src/sql/migrations/down/0006.sql b/src/sql/migrations/down/0006.sql index e69de29..b325142 100644 --- a/src/sql/migrations/down/0006.sql +++ b/src/sql/migrations/down/0006.sql @@ -0,0 +1,2 @@ +BEGIN; +COMMIT; diff --git a/src/sql/migrations/down/0007.sql b/src/sql/migrations/down/0007.sql index 54afcf3..ab2a7d8 100644 --- a/src/sql/migrations/down/0007.sql +++ b/src/sql/migrations/down/0007.sql @@ -1,4 +1,4 @@ BEGIN; ALTER TABLE `profile` DROP KEY `profile-ft`; -ALTER TABLE `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `profile_url`, `locality`, `region`, `country`); +ALTER TABLE `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `profile_url`, `locality`, `region`, `country`, `tags`); COMMIT; \ No newline at end of file diff --git a/src/sql/migrations/up/0008.sql b/src/sql/migrations/up/0008.sql index 74bf350..41661ef 100644 --- a/src/sql/migrations/up/0008.sql +++ b/src/sql/migrations/up/0008.sql @@ -1,4 +1,4 @@ BEGIN; ALTER TABLE `profile` DROP KEY `profile-ft`; -ALTER TABLE `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `username`, `locality`, `region`, `country`); +ALTER TABLE `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `username`, `locality`, `region`, `country`, `tags`); COMMIT;