We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 302b7580 authored by tobyink's avatar tobyink

Adjust User_Relationship_Flags constraints to make them... well... more constraining.

parent 657bb6c8
......@@ -262,14 +262,15 @@ if (isset($_POST['install'])) {
PRIMARY KEY (uid1, uid2))");
$adodb->Execute("CREATE TABLE User_Relationship_Flags (
uid1 INTEGER REFERENCES Users(uniqueid),
uid2 INTEGER REFERENCES Users(uniqueid),
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')");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment