[PATCH 1/2] testbot: Require that a Job's Submitted field always be set.
Francois Gouget
fgouget at codeweavers.com
Wed Jan 17 20:58:23 CST 2018
This guarantees we have at least one field to purge old jobs.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
This requires updating the database schema using update30.sql and
restarting the web server and TestBot Engine.
testbot/ddl/update30.sql | 4 ++++
testbot/ddl/winetestbot.sql | 2 +-
testbot/doc/winetestbot-schema.dia | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
create mode 100644 testbot/ddl/update30.sql
diff --git a/testbot/ddl/update30.sql b/testbot/ddl/update30.sql
new file mode 100644
index 00000000..892d8d18
--- /dev/null
+++ b/testbot/ddl/update30.sql
@@ -0,0 +1,4 @@
+USE winetestbot;
+
+ALTER TABLE Jobs
+ MODIFY Submitted DATETIME NOT NULL;
diff --git a/testbot/ddl/winetestbot.sql b/testbot/ddl/winetestbot.sql
index ad8d1a92..cebc2655 100644
--- a/testbot/ddl/winetestbot.sql
+++ b/testbot/ddl/winetestbot.sql
@@ -114,7 +114,7 @@ CREATE TABLE Jobs
Priority INT(1) NOT NULL,
Status ENUM('queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled') NOT NULL,
Remarks VARCHAR(128) NULL,
- Submitted DATETIME NULL,
+ Submitted DATETIME NOT NULL,
Ended DATETIME NULL,
PatchId INT(7) NULL,
FOREIGN KEY (BranchName) REFERENCES Branches(Name),
diff --git a/testbot/doc/winetestbot-schema.dia b/testbot/doc/winetestbot-schema.dia
index ef7c3ca7..7a948346 100644
--- a/testbot/doc/winetestbot-schema.dia
+++ b/testbot/doc/winetestbot-schema.dia
@@ -1450,7 +1450,7 @@
<dia:boolean val="false"/>
</dia:attribute>
<dia:attribute name="nullable">
- <dia:boolean val="true"/>
+ <dia:boolean val="false"/>
</dia:attribute>
<dia:attribute name="unique">
<dia:boolean val="false"/>
--
2.15.1
More information about the wine-devel
mailing list