From 4621ae2001637eb0004061f32ae81ee06510da73 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 26 Sep 2020 18:32:21 -0400 Subject: [PATCH] [Database v0008] Replace profile_url with username in profile full-text index - Prevents search matches on node domain name --- src/sql/migrations/down/0007.sql | 4 ++++ src/sql/migrations/up/0008.sql | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 src/sql/migrations/down/0007.sql create mode 100644 src/sql/migrations/up/0008.sql diff --git a/src/sql/migrations/down/0007.sql b/src/sql/migrations/down/0007.sql new file mode 100644 index 0000000..54afcf3 --- /dev/null +++ b/src/sql/migrations/down/0007.sql @@ -0,0 +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`); +COMMIT; \ No newline at end of file diff --git a/src/sql/migrations/up/0008.sql b/src/sql/migrations/up/0008.sql new file mode 100644 index 0000000..74bf350 --- /dev/null +++ b/src/sql/migrations/up/0008.sql @@ -0,0 +1,4 @@ +BEGIN; +ALTER TABLE `profile` DROP KEY `profile-ft`; +ALTER TABLE `profile` ADD FULLTEXT KEY `profile-ft` (`name`, `pdesc`, `username`, `locality`, `region`, `country`); +COMMIT;