fix meilisearch
This commit is contained in:
@@ -138,6 +138,68 @@ VALUES
|
||||
(3, 'Čeština', 2, '🇨🇿'),
|
||||
(4, 'Deutschland', 2, '🇩🇪');
|
||||
|
||||
|
||||
DELIMITER //
|
||||
|
||||
CREATE FUNCTION IF NOT EXISTS slugify_eu(input TEXT)
|
||||
RETURNS TEXT
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE s TEXT;
|
||||
|
||||
SET s = LOWER(input);
|
||||
|
||||
-- spaces
|
||||
SET s = REPLACE(s,' ','_');
|
||||
|
||||
-- Polish
|
||||
SET s = REPLACE(s,'ą','a');
|
||||
SET s = REPLACE(s,'ć','c');
|
||||
SET s = REPLACE(s,'ę','e');
|
||||
SET s = REPLACE(s,'ł','l');
|
||||
SET s = REPLACE(s,'ń','n');
|
||||
SET s = REPLACE(s,'ó','o');
|
||||
SET s = REPLACE(s,'ś','s');
|
||||
SET s = REPLACE(s,'ż','z');
|
||||
SET s = REPLACE(s,'ź','z');
|
||||
|
||||
-- German
|
||||
SET s = REPLACE(s,'ä','a');
|
||||
SET s = REPLACE(s,'ö','o');
|
||||
SET s = REPLACE(s,'ü','u');
|
||||
SET s = REPLACE(s,'ß','ss');
|
||||
|
||||
-- French
|
||||
SET s = REPLACE(s,'à','a');
|
||||
SET s = REPLACE(s,'â','a');
|
||||
SET s = REPLACE(s,'æ','ae');
|
||||
SET s = REPLACE(s,'ç','c');
|
||||
SET s = REPLACE(s,'è','e');
|
||||
SET s = REPLACE(s,'é','e');
|
||||
SET s = REPLACE(s,'ê','e');
|
||||
SET s = REPLACE(s,'ë','e');
|
||||
SET s = REPLACE(s,'î','i');
|
||||
SET s = REPLACE(s,'ï','i');
|
||||
SET s = REPLACE(s,'ô','o');
|
||||
SET s = REPLACE(s,'ù','u');
|
||||
SET s = REPLACE(s,'û','u');
|
||||
SET s = REPLACE(s,'ü','u');
|
||||
SET s = REPLACE(s,'ÿ','y');
|
||||
|
||||
-- Spanish / Portuguese
|
||||
SET s = REPLACE(s,'á','a');
|
||||
SET s = REPLACE(s,'í','i');
|
||||
SET s = REPLACE(s,'ñ','n');
|
||||
|
||||
-- Scandinavian
|
||||
SET s = REPLACE(s,'å','a');
|
||||
SET s = REPLACE(s,'ø','o');
|
||||
|
||||
RETURN s;
|
||||
END //
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
-- +goose Down
|
||||
|
||||
DROP TABLE IF EXISTS b2b_countries;
|
||||
|
||||
Reference in New Issue
Block a user