12 lines
330 B
SQL
12 lines
330 B
SQL
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;
|