From 1c1eb6009bcdb305edb9fd2c98c7a124babc9dbc Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 9 Jun 2014 03:23:51 -0400 Subject: [PATCH] utf8mb4 --- bitshift/database/migration.py | 7 ++++++- bitshift/database/schema.sql | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bitshift/database/migration.py b/bitshift/database/migration.py index 730790f..5592dfe 100644 --- a/bitshift/database/migration.py +++ b/bitshift/database/migration.py @@ -3,7 +3,7 @@ Contains information about database schema versions, and SQL queries to update between them. """ -VERSION = 10 +VERSION = 11 MIGRATIONS = [ # 1 -> 2 @@ -122,6 +122,11 @@ MIGRATIONS = [ MODIFY COLUMN `sloc_col` INT UNSIGNED DEFAULT NULL, MODIFY COLUMN `sloc_end_row` INT UNSIGNED DEFAULT NULL, MODIFY COLUMN `sloc_end_col` INT UNSIGNED DEFAULT NULL""" + ], + # 10 -> 11 + [ + """ALTER DATABASE `bitshift` + CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci""" ] ] diff --git a/bitshift/database/schema.sql b/bitshift/database/schema.sql index 6102fe8..c4d8792 100644 --- a/bitshift/database/schema.sql +++ b/bitshift/database/schema.sql @@ -1,12 +1,14 @@ --- Schema version 10 +-- Schema version 11 -CREATE DATABASE `bitshift` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; +CREATE DATABASE `bitshift` + DEFAULT CHARACTER SET utf8mb4 + COLLATE utf8mb4_unicode_ci; USE `bitshift`; CREATE TABLE `version` ( `version` INT UNSIGNED NOT NULL ) ENGINE=InnoDB; -INSERT INTO `version` VALUES (10); +INSERT INTO `version` VALUES (11); CREATE TABLE `origins` ( `origin_id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,