Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tables for support github teams #311

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions canonical-schema/V011__create_vcs_team.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
create table "vcs_Team" (
id text generated always as (pkey(source, uid)) stored primary key,
origin text,
"refreshedAt" timestamptz not null default now(),
uid text,
name text,
description text,
source text
);

create table "vcs_TeamMembership" (
id text generated always as (pkey(team, "user")) stored primary key,
origin text,
"refreshedAt" timestamptz not null default now(),
"user" text not null,
team text not null
);


alter table "vcs_TeamMembership" add foreign key ("user") references "vcs_User"(id);
alter table "vcs_TeamMembership" add foreign key (team) references "vcs_Team"(id);
Loading