summaryrefslogtreecommitdiffstats
path: root/schema
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-10-11 08:09:21 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-10-11 08:36:40 +0200
commit1492444ecbe68e4498a6f7ae0258c39ebbd47138 (patch)
tree6fcfb821edf48b10e4c030c72422e70cc9bee280 /schema
parent0dce4c4bcabec79ae796d38c3c93d424a42f718c (diff)
downloadaur-1492444ecbe68e4498a6f7ae0258c39ebbd47138.tar.gz
aur-1492444ecbe68e4498a6f7ae0258c39ebbd47138.tar.xz
Make URL columns 8000 characters wide
According to RFC 7230, URLs can be up too 8000 characters long. Resize all URL fields accordingly. Also, add a test to verify that URLs with more than 8000 characters are rejected by the update hook. Reported-by: Andreas Linz <klingt.net@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'schema')
-rw-r--r--schema/aur-schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index 030370b7..30209bd8 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -119,7 +119,7 @@ CREATE TABLE Packages (
Name VARCHAR(255) NOT NULL,
Version VARCHAR(255) NOT NULL DEFAULT '',
Description VARCHAR(255) NULL DEFAULT NULL,
- URL VARCHAR(255) NULL DEFAULT NULL,
+ URL VARCHAR(8000) NULL DEFAULT NULL,
PRIMARY KEY (ID),
UNIQUE (Name),
FOREIGN KEY (PackageBaseID) REFERENCES PackageBases(ID) ON DELETE CASCADE
@@ -227,7 +227,7 @@ CREATE INDEX RelationsRelName ON PackageRelations (RelName);
--
CREATE TABLE PackageSources (
PackageID INTEGER UNSIGNED NOT NULL,
- Source VARCHAR(255) NOT NULL DEFAULT "/dev/null",
+ Source VARCHAR(8000) NOT NULL DEFAULT "/dev/null",
SourceArch VARCHAR(255) NULL DEFAULT NULL,
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE
) ENGINE = InnoDB;