Ver a proveniência

Get rid of origin images (closes #51).

tags/v1.0^2
Ben Kurtovic há 10 anos
ascendente
cometimento
f74740d3dd
2 ficheiros alterados com 9 adições e 4 eliminações
  1. +6
    -1
      bitshift/database/migration.py
  2. +3
    -3
      bitshift/database/schema.sql

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

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

VERSION = 7
VERSION = 8

MIGRATIONS = [
# 1 -> 2
@@ -95,6 +95,11 @@ MIGRATIONS = [
"""ALTER TABLE `cache_data`
ADD COLUMN `cdata_index` TINYINT UNSIGNED NOT NULL
AFTER `cdata_codelet`"""
],
# 7 -> 8
[
"""ALTER TABLE `origins`
DROP COLUMN `origin_image`"""
]
]



+ 3
- 3
bitshift/database/schema.sql Ver ficheiro

@@ -1,4 +1,4 @@
-- Schema version 8

CREATE DATABASE `bitshift` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `bitshift`;
@@ -6,17 +6,16 @@ USE `bitshift`;
CREATE TABLE `version` (
`version` INT UNSIGNED NOT NULL
) ENGINE=InnoDB;
INSERT INTO `version` VALUES (7);
INSERT INTO `version` VALUES (8);

CREATE TABLE `origins` (
`origin_id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
`origin_name` VARCHAR(64) DEFAULT NULL,
`origin_url` VARCHAR(512) DEFAULT NULL,
`origin_url_base` VARCHAR(512) DEFAULT NULL,
`origin_image` BLOB DEFAULT NULL,
PRIMARY KEY (`origin_id`)
) ENGINE=InnoDB;
INSERT INTO `origins` VALUES (1, NULL, NULL, NULL, NULL);
INSERT INTO `origins` VALUES (1, NULL, NULL, NULL);

CREATE TABLE `code` (
`code_id` BIGINT NOT NULL,


Carregando…
Cancelar
Guardar