Преглед на файлове

New stopword list.

tags/v1.0^2
Ben Kurtovic преди 10 години
родител
ревизия
1002b3c179
променени са 2 файла, в които са добавени 19 реда и са изтрити 2 реда
  1. +11
    -1
      bitshift/database/migration.py
  2. +8
    -1
      bitshift/database/schema.sql

+ 11
- 1
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")"""
]
]



+ 8
- 1
bitshift/database/schema.sql Целия файл

@@ -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,


Зареждане…
Отказ
Запис