From a65a7bc2890f43eb8640ca183b2269fcfa02971e Mon Sep 17 00:00:00 2001 From: viktorstrate Date: Tue, 10 Mar 2020 19:03:40 +0100 Subject: [PATCH] Migrate all database tables to use utf8 Before this, photos and albums with special characters, would result in a scanner error and would not be imported properly. --- api/database/migrations/005_utf8_migration.up.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 api/database/migrations/005_utf8_migration.up.sql diff --git a/api/database/migrations/005_utf8_migration.up.sql b/api/database/migrations/005_utf8_migration.up.sql new file mode 100644 index 00000000..fb79afca --- /dev/null +++ b/api/database/migrations/005_utf8_migration.up.sql @@ -0,0 +1,9 @@ +-- Migrate all tables in database to use utf8 for better language support +ALTER TABLE access_token CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE album CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE photo CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE photo_exif CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE photo_url CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE share_token CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE site_info CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE user CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;