-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add collection and collection page to resourcetype enum (#426)
### TL;DR This PR introduces support for two new resource types: `Collection` and `CollectionPage`. ### What changed? 1. Added `Collection` and `CollectionPage` to the `ResourceType` enum in Prisma schema and generated files. 2. Created a new migration file to update the `ResourceType` enum in the database. 3. Updated the `TitleCell` component to display appropriate icons for the new resource types. ### How to test? 1. Run the Prisma migrations to update the database schema. 2. Verify that the new resource types can be created and managed through the UI. 3. Check that the correct icons are displayed for the new resource types in the `ResourceTable`. ### Why make this change? To enhance the feature set by introducing new resource types that allow better organization and categorization of content. ---
- Loading branch information
Showing
7 changed files
with
63 additions
and
12 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
10 changes: 10 additions & 0 deletions
10
...migrations/20240805083439_add_collection_and_collection_page_resource_types/migration.sql
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,10 @@ | ||
-- AlterEnum | ||
-- This migration adds more than one value to an enum. | ||
-- With PostgreSQL versions 11 and earlier, this is not possible | ||
-- in a single migration. This can be worked around by creating | ||
-- multiple migrations, each migration adding only one value to | ||
-- the enum. | ||
|
||
|
||
ALTER TYPE "ResourceType" ADD VALUE 'Collection'; | ||
ALTER TYPE "ResourceType" ADD VALUE 'CollectionPage'; |
2 changes: 2 additions & 0 deletions
2
apps/studio/prisma/migrations/20240805090947_add_root_page_resource_type/migration.sql
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,2 @@ | ||
-- AlterEnum | ||
ALTER TYPE "ResourceType" ADD VALUE 'RootPage'; |
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