This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Auto refresh team nav data; improve image handling #38
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
35d1919
Add prisma
zephraph ed191ea
Integrate sqlite via prisma, syncing from sheet
zephraph 81a37a2
Delete orphaned members
zephraph a8268a0
Remove empty reports rendering, clean unused imports
zephraph edd2333
Ignore yarn error log
zephraph 86369fb
Improve prisma connection handling
zephraph 41b0dd0
Revamp image handling; fix rendering issues
zephraph de9887b
Add revalidation to all the pages
zephraph 15ad86a
Make fallback blocking so 404 pages work
zephraph 3dacf64
Add cron job to refresh local cache
zephraph File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ node_modules | |
vars.yml | ||
.hokusai-tmp | ||
.google-api-creds.json | ||
prisma/*.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// This is your Prisma schema file, | ||
// learn more about it in the docs: https://pris.ly/d/prisma-schema | ||
|
||
datasource db { | ||
provider = "sqlite" | ||
url = "file:team.db" | ||
} | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
model Member { | ||
id Int @id @default(autoincrement()) | ||
name String @unique | ||
title String | ||
email String @unique | ||
city String? | ||
country String? | ||
floor String? | ||
startDate DateTime | ||
headshot String? | ||
preferredPronouns String? | ||
|
||
orgs Organization[] | ||
teams Team[] | ||
subteams Subteam[] | ||
|
||
manager Member? @relation("MemberToMember", fields: [managerId], references: [id]) | ||
managerId Int? | ||
reports Member[] @relation("MemberToMember") | ||
|
||
} | ||
|
||
model Organization { | ||
id Int @id @default(autoincrement()) | ||
name String @unique | ||
members Member[] | ||
} | ||
|
||
model Team { | ||
id Int @id @default(autoincrement()) | ||
name String @unique | ||
members Member[] | ||
} | ||
|
||
model Subteam { | ||
id Int @id @default(autoincrement()) | ||
name String @unique | ||
members Member[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Using prisma has been a pretty interesting journey. Their tooling (especially the editor tooling to write these schema files) is top notch. Most things just work, but sometimes it's hard to find out how to do certain things (like removing relations from an entity... use set). I've still been seeing some weird things where there are a ton of processes managing database connections and I haven't quite figured out what I'm doing wrong with that. Otherwise, it works really well.