Ignore:
Timestamp:
2019-02-05T23:03:16+13:00 (5 years ago)
Author:
ak19
Message:

More Western Wilson stuff. 1. Major changes to fix handling of utf8 stuff in db so uniqueness actually works: so finding (selecting) exact matches works and insert unique violations don't happen from code. Inserting is now made lowercase since only macrons matter and case doesn't. 2. The SQL db's MarkedWords table needs to specify the uniqueness of its utf8 marked_word column differently for the utf8-ness to work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/the-macronizer/trunk/src/sql-scripts/MySQL_Code.sql

    r32742 r32745  
    66
    77
     8/*
     9Unique constraint on marked_word field needs to be specified specially to deal with utf8
     10e.g. to distinguish between āno and anō, rather than treating them both the same breaking uniqueness.
     11https://stackoverflow.com/questions/25318479/unique-constraint-violation-with-utf-8-values
     12*/
    813CREATE TABLE IF NOT EXISTS MarkedWords (
    914    word_id INT AUTO_INCREMENT,
    10     marked_word varchar (255) UNIQUE,
     15    marked_word varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin UNIQUE,
    1116    PRIMARY KEY (word_id)
    1217    );
Note: See TracChangeset for help on using the changeset viewer.