Browse Source

utf8mb4

tags/v1.0^2
Ben Kurtovic 10 years ago
parent
commit
1c1eb6009b
2 changed files with 11 additions and 3 deletions
  1. +6
    -1
      bitshift/database/migration.py
  2. +5
    -2
      bitshift/database/schema.sql

+ 6
- 1
bitshift/database/migration.py View File

@@ -3,7 +3,7 @@ Contains information about database schema versions, and SQL queries to update
between them. between them.
""" """


VERSION = 10
VERSION = 11


MIGRATIONS = [ MIGRATIONS = [
# 1 -> 2 # 1 -> 2
@@ -122,6 +122,11 @@ MIGRATIONS = [
MODIFY COLUMN `sloc_col` INT UNSIGNED DEFAULT NULL, MODIFY COLUMN `sloc_col` INT UNSIGNED DEFAULT NULL,
MODIFY COLUMN `sloc_end_row` INT UNSIGNED DEFAULT NULL, MODIFY COLUMN `sloc_end_row` INT UNSIGNED DEFAULT NULL,
MODIFY COLUMN `sloc_end_col` 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"""
] ]
] ]




+ 5
- 2
bitshift/database/schema.sql View File

@@ -1,12 +1,14 @@
-- 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`; USE `bitshift`;


CREATE TABLE `version` ( CREATE TABLE `version` (
`version` INT UNSIGNED NOT NULL `version` INT UNSIGNED NOT NULL
) ENGINE=InnoDB; ) ENGINE=InnoDB;
INSERT INTO `version` VALUES (10);
INSERT INTO `version` VALUES (11);


CREATE TABLE `origins` ( CREATE TABLE `origins` (
`origin_id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, `origin_id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,


Loading…
Cancel
Save