librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1411] Adjust User_Relationship_Flags constraints to m


From: Toby Inkster
Subject: [Librefm-commits] [1411] Adjust User_Relationship_Flags constraints to make them...
Date: Fri, 08 May 2009 11:42:50 +0000

Revision: 1411
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1411
Author:   tobyink
Date:     2009-05-08 11:42:49 +0000 (Fri, 08 May 2009)
Log Message:
-----------
Adjust User_Relationship_Flags constraints to make them... well... more 
constraining.

Modified Paths:
--------------
    trunk/gnukebox/install.php

Modified: trunk/gnukebox/install.php
===================================================================
--- trunk/gnukebox/install.php  2009-05-08 11:34:51 UTC (rev 1410)
+++ trunk/gnukebox/install.php  2009-05-08 11:42:49 UTC (rev 1411)
@@ -262,14 +262,15 @@
                PRIMARY KEY (uid1, uid2))");
 
        $adodb->Execute("CREATE TABLE User_Relationship_Flags (
-               uid1 INTEGER REFERENCES Users(uniqueid),
-               uid2 INTEGER REFERENCES Users(uniqueid),
+               uid1 INTEGER,
+               uid2 INTEGER,
                flag VARCHAR(12) REFERENCES Relationship_Flags(flag),
-               PRIMARY KEY (uid1, uid2, flag))");
+               PRIMARY KEY (uid1, uid2, flag),
+               FOREIGN KEY (uid1, uid2) REFERENCES User_Relationships (uid1, 
uid2))");
 
        $adodb->Execute("CREATE TABLE Relationship_Flags (
                flag VARCHAR(12),
-               PRIMARY KEY (flag)");
+               PRIMARY KEY (flag))");
 
        $adodb->Execute("INSERT INTO Relationship_Flags VALUES ('contact')");
        $adodb->Execute("INSERT INTO Relationship_Flags VALUES 
('acquaintance')");





reply via email to

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