Skip to content

Commit

Permalink
feat: add tables for support github teams (#311)
Browse files Browse the repository at this point in the history
* update canonical schema for teams and membership
  • Loading branch information
jaorr95 authored Aug 22, 2023
1 parent a8caa44 commit a467dc0
Showing 1 changed file with 21 additions and 0 deletions.
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);

0 comments on commit a467dc0

Please sign in to comment.