[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: sql: Cascade deletion.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: sql: Cascade deletion. |
Date: |
Tue, 09 Mar 2021 13:14:33 -0500 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix-cuirass.
The following commit(s) were added to refs/heads/master by this push:
new eb060c9 sql: Cascade deletion.
eb060c9 is described below
commit eb060c990f37353be32134ff839d2fa860b6b4a6
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Mar 9 19:13:44 2021 +0100
sql: Cascade deletion.
* src/schema.sql: Cascade Evaluations, Checkouts and Builds deletion.
---
src/schema.sql | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/schema.sql b/src/schema.sql
index b0838d6..90b4e6a 100644
--- a/src/schema.sql
+++ b/src/schema.sql
@@ -21,7 +21,7 @@ CREATE TABLE Evaluations (
timestamp INTEGER NOT NULL,
checkouttime INTEGER NOT NULL,
evaltime INTEGER NOT NULL,
- FOREIGN KEY (specification) REFERENCES Specifications(name)
+ FOREIGN KEY (specification) REFERENCES Specifications(name) ON DELETE CASCADE
);
CREATE TABLE Checkouts (
@@ -32,8 +32,8 @@ CREATE TABLE Checkouts (
directory TEXT NOT NULL,
timestamp INTEGER NOT NULL,
PRIMARY KEY (specification, revision),
- FOREIGN KEY (evaluation) REFERENCES Evaluations(id),
- FOREIGN KEY (specification) REFERENCES Specifications(name)
+ FOREIGN KEY (evaluation) REFERENCES Evaluations(id) ON DELETE CASCADE,
+ FOREIGN KEY (specification) REFERENCES Specifications(name) ON DELETE CASCADE
);
CREATE TABLE Builds (
@@ -54,7 +54,7 @@ CREATE TABLE Builds (
timestamp INTEGER NOT NULL,
starttime INTEGER NOT NULL,
stoptime INTEGER NOT NULL,
- FOREIGN KEY (evaluation) REFERENCES Evaluations(id)
+ FOREIGN KEY (evaluation) REFERENCES Evaluations(id) ON DELETE CASCADE
);
CREATE TABLE Outputs (
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: sql: Cascade deletion.,
Mathieu Othacehe <=