Ver código fonte

utf8mb4

tags/v1.0^2
Ben Kurtovic 10 anos atrás
pai
commit
1c1eb6009b
2 arquivos alterados com 11 adições e 3 exclusões
  1. +6
    -1
      bitshift/database/migration.py
  2. +5
    -2
      bitshift/database/schema.sql

+ 6
- 1
bitshift/database/migration.py Ver arquivo

@@ -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"""
]
]



+ 5
- 2
bitshift/database/schema.sql Ver arquivo

@@ -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`;

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,


Carregando…
Cancelar
Salvar