-
Notifications
You must be signed in to change notification settings - Fork 196
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 #26 from piyushgarg-dev/feat/remove-slug-for-project
refactor: removed the support for slug from project and added support…
- Loading branch information
Showing
7 changed files
with
43 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export interface CreateProjectData { | ||
name: string | ||
slug: string | ||
subdomain: string | ||
customDomain?: string | ||
} |
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,4 +1,4 @@ | ||
export const queries = `#graphql | ||
getUserProjects: [Project] | ||
getProjectBySlug(slug: String!): Project | ||
getProjectByDomain(domain: String!): Project | ||
` |
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
22 changes: 22 additions & 0 deletions
22
prisma/migrations/20231008073028_add_custom_subdomain_to_project/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,22 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `slug` on the `projects` table. All the data in the column will be lost. | ||
- A unique constraint covering the columns `[subdomain]` on the table `projects` will be added. If there are existing duplicate values, this will fail. | ||
- A unique constraint covering the columns `[custom_domain]` on the table `projects` will be added. If there are existing duplicate values, this will fail. | ||
- Added the required column `subdomain` to the `projects` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropIndex | ||
DROP INDEX "projects_slug_key"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "projects" DROP COLUMN "slug", | ||
ADD COLUMN "custom_domain" TEXT, | ||
ADD COLUMN "subdomain" TEXT NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "projects_subdomain_key" ON "projects"("subdomain"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "projects_custom_domain_key" ON "projects"("custom_domain"); |
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