Add a role column to the database and start using it

We cannot yet stop using `admin` because stable will continue writing
it.
This commit is contained in:
Conrad Irwin 2023-10-11 16:34:11 -06:00
parent be1800884e
commit 690d9fb971
10 changed files with 76 additions and 30 deletions

View file

@ -226,6 +226,7 @@ CREATE TABLE "channel_members" (
"channel_id" INTEGER NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
"user_id" INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
"admin" BOOLEAN NOT NULL DEFAULT false,
"role" VARCHAR,
"accepted" BOOLEAN NOT NULL DEFAULT false,
"updated_at" TIMESTAMP NOT NULL DEFAULT now
);