summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-06-05 08:50:52 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-06-05 15:12:10 +0200
commit7a5bfd83c4baec41bf8aa9015ef46eca5d629716 (patch)
tree7ebd8caa2d84aac41e8f62a048c9d646112829c2
parent9b5271d737afb8501817db4c4f0dc25b34d8c538 (diff)
Increase the size of several database fields
Several fields turned out to be too small (e.g. when long package versions are used in VCS packages). Since the type of all affected fields is VARCHAR, there is no reason to keep them as small as possible. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--UPGRADING17
-rw-r--r--schema/aur-schema.sql14
2 files changed, 24 insertions, 7 deletions
diff --git a/UPGRADING b/UPGRADING
index a45c970..863fde3 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -1,6 +1,23 @@
Upgrading
=========
+From 3.0.0 to 3.1.0
+-------------------
+
+1. Increase the size of all fields containing package names, license names,
+group names or package versions:
+
+----
+ALTER TABLE PackageBases MODIFY Name VARCHAR(255) NOT NULL;
+ALTER TABLE Packages
+ MODIFY Name VARCHAR(255) NOT NULL,
+ MODIFY Version VARCHAR(255) NOT NULL DEFAULT '';
+ALTER TABLE Licenses MODIFY Name VARCHAR(255) NOT NULL;
+ALTER TABLE Groups MODIFY Name VARCHAR(255) NOT NULL;
+ALTER TABLE PackageDepends MODIFY DepCondition VARCHAR(255);
+ALTER TABLE PackageRelations MODIFY RelCondition VARCHAR(255);
+----
+
From 2.3.1 to 3.0.0
-------------------
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index adacdf0..0efae93 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -96,7 +96,7 @@ INSERT INTO PackageCategories (Category) VALUES ('fonts');
--
CREATE TABLE PackageBases (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
- Name VARCHAR(64) NOT NULL,
+ Name VARCHAR(255) NOT NULL,
CategoryID TINYINT UNSIGNED NOT NULL DEFAULT 1,
NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0,
OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL,
@@ -125,8 +125,8 @@ CREATE TABLE PackageBases (
CREATE TABLE Packages (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
PackageBaseID INTEGER UNSIGNED NOT NULL,
- Name VARCHAR(64) NOT NULL,
- Version VARCHAR(32) NOT NULL DEFAULT '',
+ Name VARCHAR(255) NOT NULL,
+ Version VARCHAR(255) NOT NULL DEFAULT '',
Description VARCHAR(255) NOT NULL DEFAULT "An Arch Package",
URL VARCHAR(255) NOT NULL DEFAULT "https://www.archlinux.org",
PRIMARY KEY (ID),
@@ -139,7 +139,7 @@ CREATE TABLE Packages (
--
CREATE TABLE Licenses (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
- Name VARCHAR(64) NOT NULL,
+ Name VARCHAR(255) NOT NULL,
PRIMARY KEY (ID),
UNIQUE (Name)
) ENGINE = InnoDB;
@@ -160,7 +160,7 @@ CREATE TABLE PackageLicenses (
--
CREATE TABLE Groups (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
- Name VARCHAR(64) NOT NULL,
+ Name VARCHAR(255) NOT NULL,
PRIMARY KEY (ID),
UNIQUE (Name)
) ENGINE = InnoDB;
@@ -196,7 +196,7 @@ CREATE TABLE PackageDepends (
PackageID INTEGER UNSIGNED NOT NULL,
DepTypeID TINYINT UNSIGNED NOT NULL,
DepName VARCHAR(255) NOT NULL,
- DepCondition VARCHAR(20),
+ DepCondition VARCHAR(255),
INDEX (PackageID),
INDEX (DepName),
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,
@@ -222,7 +222,7 @@ CREATE TABLE PackageRelations (
PackageID INTEGER UNSIGNED NOT NULL,
RelTypeID TINYINT UNSIGNED NOT NULL,
RelName VARCHAR(255) NOT NULL,
- RelCondition VARCHAR(20),
+ RelCondition VARCHAR(255),
INDEX (PackageID),
INDEX (RelName),
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,