Browse Source

Get rid of origin images (closes #51).

tags/v1.0^2
Ben Kurtovic 10 years ago
parent
commit
f74740d3dd
2 changed files with 9 additions and 4 deletions
  1. +6
    -1
      bitshift/database/migration.py
  2. +3
    -3
      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 = 7
VERSION = 8


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




+ 3
- 3
bitshift/database/schema.sql View File

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


CREATE DATABASE `bitshift` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE DATABASE `bitshift` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `bitshift`; USE `bitshift`;
@@ -6,17 +6,16 @@ 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 (7);
INSERT INTO `version` VALUES (8);


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


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


Loading…
Cancel
Save