-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[db] Implement new Team and Project entities #4368
Conversation
Migration seems to work as expected: (view MySQL tables)
Now I should probably add a few useful methods to the interfaces and verify they work. |
87158e0
to
afba73e
Compare
components/gitpod-db/src/typeorm/migration/1621920691254-InitialComSetup.ts
Show resolved
Hide resolved
c18f55e
to
c9f4aba
Compare
|
||
export const TeamDB = Symbol('TeamDB'); | ||
export interface TeamDB { | ||
findTeamsByUser(userId: string): Promise<Team[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential improvements / follow-ups:
- create a new team
- delete a team
- add user to team
- remove user from team
@Index("ind_userId") | ||
userId: string; | ||
|
||
// This column triggers the db-sync deletion mechanism. It's not intended for public consumption. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add creationTime
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add a creationTime
to a team membership? (Note: There is already the _lastModified
field, and I don't expect that we'll modify memberships -- just add or delete.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot access _lastmodified can I? In the member list I'd like to see joined 2 months ago
or so.
… exist in Baseline)
c9f4aba
to
8f9c553
Compare
Also: - set up EditorConfig to trim trailing whitespaces - install Docker VS Code extension by default
8f9c553
to
c95f880
Compare
How to test
(I'm not sure how to run the unit test)
Log in to https://jx-teams-and-projects.staging.gitpod-dev.com/ and check the Console (it should log
Teams: []
)Connect to the DB, manually create a new team, and assign yourself to it:
Teams: [{ ... }]
(i.e. your team)