Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[2ef78a]: ddl / winetestbot.sql Maximize Restore History

Download this file

winetestbot.sql    164 lines (147 with data), 5.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
CREATE DATABASE winetestbot DEFAULT CHARSET=utf8 DEFAULT COLLATE=utf8_bin;
USE winetestbot;
CREATE TABLE Users
(
Name VARCHAR(40) NOT NULL,
EMail VARCHAR(40) NOT NULL,
Password CHAR(49) NOT NULL,
Active ENUM('Y', 'N') NOT NULL,
RealName VARCHAR(40) NULL,
ResetCode CHAR(32) NULL,
PRIMARY KEY(Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Roles
(
Name VARCHAR(20) NOT NULL,
IsDefaultRole ENUM('Y', 'N') NOT NULL,
PRIMARY KEY(Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE UserRoles
(
UserName VARCHAR(40) NOT NULL,
RoleName VARCHAR(20) NOT NULL,
PRIMARY KEY (UserName, RoleName),
FOREIGN KEY (UserName) REFERENCES Users(Name),
FOREIGN KEY (RoleName) REFERENCES Roles(Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Sessions
(
Id CHAR(32) NOT NULL,
UserName VARCHAR(40) NOT NULL,
Permanent ENUM('Y', 'N') NOT NULL,
PRIMARY KEY (Id),
FOREIGN KEY (UserName) REFERENCES Users(Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE VMs
(
Name VARCHAR(20) NOT NULL,
Type ENUM('base', 'extra', 'build', 'retired') NOT NULL,
SortOrder INT(3) NOT NULL,
Bits ENUM('32', '64') NOT NULL,
Status ENUM('reverting', 'sleeping', 'idle', 'running', 'dirty', 'offline') NOT NULL,
VmxHost VARCHAR(64) NULL,
VmxFilePath VARCHAR(64) NOT NULL,
IdleSnapshot VARCHAR(32) NOT NULL,
Interactive ENUM('Y', 'N') NOT NULL,
Description VARCHAR(40) NULL,
PRIMARY KEY (Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Patches
(
Id INT(7) NOT NULL,
Received DATETIME NOT NULL,
Disposition VARCHAR(40) NOT NULL,
AffectsTests ENUM('Y', 'N') NOT NULL
FromName VARCHAR(40) NULL,
FromEMail VARCHAR(40) NULL,
Subject VARCHAR(120) NULL,
PRIMARY KEY (Id)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE PendingPatchSets
(
EMail VARCHAR(40) NOT NULL,
TotalParts INT(2) NOT NULL,
PRIMARY KEY (EMail, TotalParts)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE PendingPatches
(
PendingPatchSetEMail VARCHAR(40) NOT NULL,
PendingPatchSetTotalParts INT(2) NOT NULL,
No INT(2) NOT NULL,
PatchId INT(7) NOT NULL,
FOREIGN KEY (PendingPatchSetEMail, PendingPatchSetTotalParts)
REFERENCES PendingPatchSets(EMail, TotalParts),
FOREIGN KEY (PatchId) REFERENCES Patches(Id),
PRIMARY KEY (PendingPatchSetEMail, PendingPatchSetTotalParts, No)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Branches
(
Name VARCHAR(20) NOT NULL,
IsDefault ENUM('Y', 'N') NOT NULL,
PRIMARY KEY(Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Jobs
(
Id INT(5) NOT NULL AUTO_INCREMENT,
Archived ENUM('Y', 'N') NOT NULL,
BranchName VARCHAR(20) NOT NULL,
UserName VARCHAR(40) NOT NULL,
Priority INT(1) NOT NULL,
Status ENUM('queued', 'running', 'completed', 'failed') NOT NULL,
Remarks VARCHAR(50) NULL,
Submitted DATETIME NULL,
Ended DATETIME NULL,
PatchId INT(7) NULL,
FOREIGN KEY (BranchName) REFERENCES Branches(Name),
FOREIGN KEY (UserName) REFERENCES Users(Name),
FOREIGN KEY (PatchId) REFERENCES Patches(Id),
PRIMARY KEY (Id),
INDEX JobsArchived (Archived)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Steps
(
JobId INT(5) NOT NULL,
No INT(2) NOT NULL,
Type ENUM('suite', 'single', 'build', 'reconfig') NOT NULL,
Status ENUM('queued', 'running', 'completed', 'failed', 'skipped') NOT NULL,
FileName VARCHAR(100) NOT NULL,
FileType ENUM('exe32', 'exe64', 'patchdlls', 'patchprograms', 'dll32', 'dll64', 'zip') NOT NULL,
InStaging ENUM('Y', 'N') NOT NULL,
DebugLevel INT(2) NOT NULL,
ReportSuccessfulTests ENUM('Y', 'N') NOT NULL,
PRIMARY KEY (JobId, No),
FOREIGN KEY (JobId) REFERENCES Jobs(Id)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE Tasks
(
JobId INT(5) NOT NULL,
StepNo INT(2) NOT NULL,
No INT(2) NOT NULL,
Status ENUM('queued', 'running', 'completed', 'failed', 'skipped') NOT NULL,
VMName VARCHAR(20) NOT NULL,
Timeout INT(4) NOT NULL,
CmdLineArg VARCHAR(256) NULL,
ChildPid INT(5) NULL,
Started DATETIME NULL,
Ended DATETIME NULL,
TestFailures INT(6) NULL,
PRIMARY KEY (JobId, StepNo, No),
FOREIGN KEY(VMName) REFERENCES VMs(Name)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO Roles (Name, IsDefaultRole) VALUES('admin', 'N');
INSERT INTO Roles (Name, IsDefaultRole) VALUES('wine-devel', 'Y');
INSERT INTO Users (Name, EMail, Password, Active, RealName)
VALUES('batch', '/dev/null', '*', 'Batch user for internal jobs', NULL);
INSERT INTO Branches (Name, IsDefault) VALUES('master', 'Y');