13 lines
330 B
MySQL
13 lines
330 B
MySQL
|
BEGIN TRANSACTION;
|
||
|
|
||
|
CREATE TABLE IF NOT EXISTS "ns-syncs" (
|
||
|
"username" TEXT NOT NULL,
|
||
|
"source" TEXT NOT NULL,
|
||
|
"destination" TEXT NOT NULL UNIQUE,
|
||
|
UNIQUE("username", "source", "destination"),
|
||
|
FOREIGN KEY("username") REFERENCES "users"("id"),
|
||
|
FOREIGN KEY("destination") REFERENCES "zones"("zone")
|
||
|
);
|
||
|
|
||
|
COMMIT;
|