diff --git a/bitshift/database/migration.py b/bitshift/database/migration.py index 5592dfe..84cf3d0 100644 --- a/bitshift/database/migration.py +++ b/bitshift/database/migration.py @@ -3,7 +3,7 @@ Contains information about database schema versions, and SQL queries to update between them. """ -VERSION = 11 +VERSION = 12 MIGRATIONS = [ # 1 -> 2 @@ -127,6 +127,16 @@ MIGRATIONS = [ [ """ALTER DATABASE `bitshift` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci""" + ], + # 11 -> 12 + [ + """CREATE TABLE `stopwords` + LIKE information_schema.innodb_ft_default_stopword""", + """INSERT INTO `stopwords` VALUES + ("a"), ("about"), ("an"), ("are"), ("as"), ("at"), ("be"), ("by"), + ("how"), ("i"), ("it"), ("la"), ("of"), ("on"), ("that"), ("the"), + ("to"), ("und"), ("was"), ("what"), ("when"), ("where"), ("who"), + ("will")""" ] ] diff --git a/bitshift/database/schema.sql b/bitshift/database/schema.sql index c4d8792..0270e98 100644 --- a/bitshift/database/schema.sql +++ b/bitshift/database/schema.sql @@ -1,4 +1,4 @@ --- Schema version 11 +-- Schema version 12 CREATE DATABASE `bitshift` DEFAULT CHARACTER SET utf8mb4 @@ -8,7 +8,13 @@ USE `bitshift`; CREATE TABLE `version` ( `version` INT UNSIGNED NOT NULL ) ENGINE=InnoDB; -INSERT INTO `version` VALUES (11); +INSERT INTO `version` VALUES (12); + +CREATE TABLE `stopwords` LIKE information_schema.innodb_ft_default_stopword; +INSERT INTO `stopwords` VALUES + ("a"), ("about"), ("an"), ("are"), ("as"), ("at"), ("be"), ("by"), ("how"), + ("i"), ("it"), ("la"), ("of"), ("on"), ("that"), ("the"), ("to"), ("und"), + ("was"), ("what"), ("when"), ("where"), ("who"), ("will"); CREATE TABLE `origins` ( `origin_id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,