From f74740d3ddf5b9ca9c9f07a009154e86dec9b781 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 3 Jun 2014 22:28:05 -0400 Subject: [PATCH] Get rid of origin images (closes #51). --- bitshift/database/migration.py | 7 ++++++- bitshift/database/schema.sql | 7 +++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bitshift/database/migration.py b/bitshift/database/migration.py index 428aaf2..9a74a18 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 = 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`""" ] ] diff --git a/bitshift/database/schema.sql b/bitshift/database/schema.sql index c431ce9..913a365 100644 --- a/bitshift/database/schema.sql +++ b/bitshift/database/schema.sql @@ -1,4 +1,4 @@ --- Schema version 7 +-- 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,