chore: changed properties to embedProperties in shortcode model

This commit is contained in:
Balu Babu
2023-11-06 13:18:14 +05:30
parent 2064af92fc
commit 3eef6c9b04
6 changed files with 27 additions and 56 deletions

View File

@@ -1,16 +0,0 @@
/*
Warnings:
- A unique constraint covering the columns `[id]` on the table `Shortcode` will be added. If there are existing duplicate values, this will fail.
- Added the required column `updatedOn` to the `Shortcode` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Shortcode" ADD COLUMN "properties" JSONB,
ADD COLUMN "updatedOn" TIMESTAMP(3) NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "Shortcode_id_key" ON "Shortcode"("id");
-- AddForeignKey
ALTER TABLE "Shortcode" ADD CONSTRAINT "Shortcode_creatorUid_fkey" FOREIGN KEY ("creatorUid") REFERENCES "User"("uid") ON DELETE SET NULL ON UPDATE CASCADE;

View File

@@ -68,13 +68,13 @@ model TeamRequest {
}
model Shortcode {
id String @id @unique
request Json
properties Json? // if properties is null, SharedRequest is an shortcode else embed
creatorUid String?
User User? @relation(fields: [creatorUid], references: [uid])
createdOn DateTime @default(now())
updatedOn DateTime @updatedAt
id String @id @unique
request Json
embedProperties Json?
creatorUid String?
User User? @relation(fields: [creatorUid], references: [uid])
createdOn DateTime @default(now())
updatedOn DateTime @updatedAt
@@unique(fields: [id, creatorUid], name: "creator_uid_shortcode_unique")
}