Refactor database table name for IsOnWhatsapp

This commit is contained in:
Judson Cairo 2024-08-30 16:37:20 -03:00
parent 41342f39de
commit 4cdf76f381
2 changed files with 26 additions and 6 deletions

View File

@ -0,0 +1,22 @@
/*
Warnings:
- You are about to drop the `is_on_whatsapp` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropTable
DROP TABLE "is_on_whatsapp";
-- CreateTable
CREATE TABLE "IsOnWhatsapp" (
"id" TEXT NOT NULL,
"remoteJid" VARCHAR(100) NOT NULL,
"jidOptions" TEXT NOT NULL,
"createdAt" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP NOT NULL,
CONSTRAINT "IsOnWhatsapp_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "IsOnWhatsapp_remoteJid_key" ON "IsOnWhatsapp"("remoteJid");

View File

@ -577,10 +577,8 @@ model FlowiseSetting {
model IsOnWhatsapp {
id String @id @default(cuid())
remoteJid String @unique @map("remote_jid") @db.VarChar(100)
jidOptions String @map("jid_options")
createdAt DateTime @default(now()) @map("created_at") @db.Timestamp
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamp
@@map("is_on_whatsapp")
remoteJid String @unique @db.VarChar(100)
jidOptions String
createdAt DateTime @default(now()) @db.Timestamp
updatedAt DateTime @updatedAt @db.Timestamp
}