forked from ytgov/internal-data-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from icefoganalytics/issue-104/fix-datasets-t…
…able-render-crash-from-bad-acronym Fix Datasets Table Render Crash From Bad Acronym
- Loading branch information
Showing
14 changed files
with
1,190 additions
and
36 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
api/src/db/migrations/2024.06.07T00.36.14.clean-user-group-names.ts
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,14 @@ | ||
import type { Migration } from "@/db/umzug" | ||
import { UserGroup } from "@/models" | ||
|
||
export const up: Migration = async () => { | ||
await UserGroup.findEach(async (userGroup) => { | ||
await userGroup.update({ | ||
name: userGroup.name.trim().replace(/\s+/g, " "), | ||
}) | ||
}) | ||
} | ||
|
||
export const down: Migration = async () => { | ||
// no-op | ||
} |
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
Oops, something went wrong.