Explorar el Código

New stopword list.

tags/v1.0^2
Ben Kurtovic hace 10 años
padre
commit
1002b3c179
Se han modificado 2 ficheros con 19 adiciones y 2 borrados
  1. +11
    -1
      bitshift/database/migration.py
  2. +8
    -1
      bitshift/database/schema.sql

+ 11
- 1
bitshift/database/migration.py Ver fichero

@@ -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 Ver fichero

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


Cargando…
Cancelar
Guardar