feat: added new property to existing shortcode model in prisma schema
This commit is contained in:
@@ -107,7 +107,7 @@ services:
|
||||
build:
|
||||
dockerfile: packages/hoppscotch-backend/Dockerfile
|
||||
context: .
|
||||
target: prod
|
||||
target: dev
|
||||
env_file:
|
||||
- ./.env
|
||||
restart: always
|
||||
@@ -117,7 +117,7 @@ services:
|
||||
- PORT=3000
|
||||
volumes:
|
||||
# Uncomment the line below when modifying code. Only applicable when using the "dev" target.
|
||||
# - ./packages/hoppscotch-backend/:/usr/src/app
|
||||
- ./packages/hoppscotch-backend/:/usr/src/app
|
||||
- /usr/src/app/node_modules/
|
||||
depends_on:
|
||||
hoppscotch-db:
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Shortcode" ADD COLUMN "properties" JSONB;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Shortcode" ADD CONSTRAINT "Shortcode_creatorUid_fkey" FOREIGN KEY ("creatorUid") REFERENCES "User"("uid") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -67,10 +67,21 @@ model TeamRequest {
|
||||
updatedOn DateTime @updatedAt @db.Timestamp(3)
|
||||
}
|
||||
|
||||
// model Shortcode {
|
||||
// id String @id
|
||||
// request Json
|
||||
// creatorUid String?
|
||||
// createdOn DateTime @default(now())
|
||||
|
||||
// @@unique(fields: [id, creatorUid], name: "creator_uid_shortcode_unique")
|
||||
// }
|
||||
|
||||
model Shortcode {
|
||||
id String @id
|
||||
request Json
|
||||
properties Json? // if properties is null, SharedRequest is an embed else shortcode
|
||||
creatorUid String?
|
||||
User User? @relation(fields: [creatorUid], references: [uid])
|
||||
createdOn DateTime @default(now())
|
||||
|
||||
@@unique(fields: [id, creatorUid], name: "creator_uid_shortcode_unique")
|
||||
@@ -102,6 +113,7 @@ model User {
|
||||
currentGQLSession Json?
|
||||
createdOn DateTime @default(now()) @db.Timestamp(3)
|
||||
invitedUsers InvitedUsers[]
|
||||
shortcodes Shortcode[]
|
||||
}
|
||||
|
||||
model Account {
|
||||
|
||||
Reference in New Issue
Block a user