1 1. Add support for package requests to the database:
4 CREATE TABLE RequestTypes (
5 ID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
6 Name VARCHAR(32) NOT NULL DEFAULT '',
9 INSERT INTO RequestTypes VALUES (1, 'deletion');
10 INSERT INTO RequestTypes VALUES (2, 'orphan');
11 INSERT INTO RequestTypes VALUES (3, 'merge');
13 CREATE TABLE PackageRequests (
14 ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
15 ReqTypeID TINYINT UNSIGNED NOT NULL,
16 PackageBaseID INTEGER UNSIGNED NULL,
17 PackageBaseName VARCHAR(255) NOT NULL,
18 MergeBaseName VARCHAR(255) NULL,
19 UsersID INTEGER UNSIGNED NULL DEFAULT NULL,
20 Comments TEXT NOT NULL DEFAULT '',
21 RequestTS BIGINT UNSIGNED NOT NULL DEFAULT 0,
22 Status TINYINT UNSIGNED NOT NULL DEFAULT 0,
25 INDEX (PackageBaseID),
26 FOREIGN KEY (ReqTypeID) REFERENCES RequestTypes(ID) ON DELETE NO ACTION,
27 FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE SET NULL,
28 FOREIGN KEY (PackageBaseID) REFERENCES PackageBases(ID) ON DELETE SET NULL