From c8c3314430b4193b03231b093c48797a916085a8 Mon Sep 17 00:00:00 2001 From: Balu Babu Date: Mon, 6 Nov 2023 13:20:02 +0530 Subject: [PATCH] feat: generated migrations file for new schema changes to Shortcodes table --- .../20231106074926_embeds_addition/migration.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/hoppscotch-backend/prisma/migrations/20231106074926_embeds_addition/migration.sql diff --git a/packages/hoppscotch-backend/prisma/migrations/20231106074926_embeds_addition/migration.sql b/packages/hoppscotch-backend/prisma/migrations/20231106074926_embeds_addition/migration.sql new file mode 100644 index 000000000..f6720852b --- /dev/null +++ b/packages/hoppscotch-backend/prisma/migrations/20231106074926_embeds_addition/migration.sql @@ -0,0 +1,16 @@ +/* + 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 "embedProperties" 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;