-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove pg-typed part 1 (#9508)
* chore: refactor archive team Signed-off-by: Matt Krick <matt.krick@gmail.com> * remove archivedTeam sql Signed-off-by: Matt Krick <matt.krick@gmail.com> * refactor addNewFeature sql Signed-off-by: Matt Krick <matt.krick@gmail.com> * chore: refactor add/remove reactjis Signed-off-by: Matt Krick <matt.krick@gmail.com> * chore: refactor add/remove feature flags Signed-off-by: Matt Krick <matt.krick@gmail.com> * chore: refactor appendUserTmsQuery Signed-off-by: Matt Krick <matt.krick@gmail.com> * fix: revert sharp back to v0.32.6 (#9509) Signed-off-by: Matt Krick <matt.krick@gmail.com> --------- Signed-off-by: Matt Krick <matt.krick@gmail.com>
- Loading branch information
Showing
16 changed files
with
66 additions
and
120 deletions.
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
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
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
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/server/postgres/queries/src/addUserNewFeatureQuery.sql
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/server/postgres/queries/src/appendTeamResponseReactjiQuery.sql
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/server/postgres/queries/src/appendUserFeatureFlagsQuery.sql
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/server/postgres/queries/src/archiveTeamsByTeamIdsQuery.sql
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/server/postgres/queries/src/removeTeamResponseReactjiQuery.sql
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/server/postgres/queries/src/removeUserFeatureFlagsQuery.sql
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
import getPg from '../postgres/getPg' | ||
import {appendUserTmsQuery} from '../postgres/queries/generated/appendUserTmsQuery' | ||
import {sql} from 'kysely' | ||
import getKysely from '../postgres/getKysely' | ||
|
||
const addTeamIdToTMS = async (userId: string, teamId: string) => { | ||
return appendUserTmsQuery.run({id: userId, teamId}, getPg()) | ||
const pg = getKysely() | ||
return pg | ||
.updateTable('User') | ||
.set({tms: sql`arr_append_uniq("tms", ${teamId})`}) | ||
.where('id', '=', userId) | ||
.execute() | ||
} | ||
|
||
export default addTeamIdToTMS |
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