mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
8a3425477f
Co-authored-by: Nathan Sobo <nathan@zed.dev>
11 lines
443 B
SQL
11 lines
443 B
SQL
CREATE TABLE IF NOT EXISTS "contacts" (
|
|
"id" SERIAL PRIMARY KEY,
|
|
"user_id_a" INTEGER REFERENCES users (id) NOT NULL,
|
|
"user_id_b" INTEGER REFERENCES users (id) NOT NULL,
|
|
"a_to_b" BOOLEAN NOT NULL,
|
|
"should_notify" BOOLEAN NOT NULL,
|
|
"accepted" BOOLEAN NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_contacts_user_ids" ON "contacts" ("user_id_a", "user_id_b");
|
|
CREATE INDEX "index_contacts_user_id_b" ON "contacts" ("user_id_b");
|