Browse Source

New stopword list.

tags/v1.0^2
Ben Kurtovic 10 years ago
parent
commit
1002b3c179
2 changed files with 19 additions and 2 deletions
  1. +11
    -1
      bitshift/database/migration.py
  2. +8
    -1
      bitshift/database/schema.sql

+ 11
- 1
bitshift/database/migration.py View File

@@ -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")"""
]
]



+ 8
- 1
bitshift/database/schema.sql View File

@@ -1,4 +1,4 @@
-- 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,


Loading…
Cancel
Save