guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Fix Jobs Builds foreign key.


From: Mathieu Othacehe
Subject: branch master updated: Fix Jobs Builds foreign key.
Date: Fri, 09 Apr 2021 05:33:32 -0400

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 d601fe0  Fix Jobs Builds foreign key.
d601fe0 is described below

commit d601fe0e4c85ab7b37f0571e898448c9fadde715
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Fri Apr 9 11:32:53 2021 +0200

    Fix Jobs Builds foreign key.
    
    * src/sql/upgrade-6.sql: New file.
    * Makefile.am (dist_sql_DATA): Add it.
---
 Makefile.am           | 3 ++-
 src/sql/upgrade-6.sql | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 84c799c..bf093a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -92,7 +92,8 @@ dist_sql_DATA =                               \
   src/sql/upgrade-2.sql                                \
   src/sql/upgrade-3.sql                                \
   src/sql/upgrade-4.sql                                \
-  src/sql/upgrade-5.sql
+  src/sql/upgrade-5.sql                                \
+  src/sql/upgrade-6.sql
 
 dist_css_DATA =                                        \
   src/static/css/choices.min.css               \
diff --git a/src/sql/upgrade-6.sql b/src/sql/upgrade-6.sql
new file mode 100644
index 0000000..7a321e0
--- /dev/null
+++ b/src/sql/upgrade-6.sql
@@ -0,0 +1,9 @@
+BEGIN TRANSACTION;
+
+ALTER TABLE Jobs DROP CONSTRAINT fk_builds;
+ALTER TABLE Jobs ADD CONSTRAINT fk_builds
+   FOREIGN KEY (build)
+   REFERENCES Builds(id)
+   ON DELETE CASCADE;
+
+COMMIT;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]