mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 11:22:21 -06:00
fix: adjusts for new manager
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The values [open] on the enum `TypebotSessionStatus` will be removed. If these variants are still used in the database, this will fail.
|
||||
- Changed the type of `status` on the `TypebotSession` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- AlterEnum
|
||||
BEGIN;
|
||||
CREATE TYPE "TypebotSessionStatus_new" AS ENUM ('opened', 'closed', 'paused');
|
||||
ALTER TABLE "TypebotSession" ALTER COLUMN "status" TYPE "TypebotSessionStatus_new" USING ("status"::text::"TypebotSessionStatus_new");
|
||||
ALTER TABLE "OpenaiSession" ALTER COLUMN "status" TYPE "TypebotSessionStatus_new" USING ("status"::text::"TypebotSessionStatus_new");
|
||||
ALTER TYPE "TypebotSessionStatus" RENAME TO "TypebotSessionStatus_old";
|
||||
ALTER TYPE "TypebotSessionStatus_new" RENAME TO "TypebotSessionStatus";
|
||||
DROP TYPE "TypebotSessionStatus_old";
|
||||
COMMIT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "TypebotSession" DROP COLUMN "status",
|
||||
ADD COLUMN "status" "TypebotSessionStatus" NOT NULL;
|
||||
@@ -36,6 +36,7 @@ enum TypebotSessionStatus {
|
||||
enum TriggerType {
|
||||
all
|
||||
keyword
|
||||
none
|
||||
}
|
||||
|
||||
enum TriggerOperator {
|
||||
|
||||
@@ -28,7 +28,7 @@ enum DeviceMessage {
|
||||
}
|
||||
|
||||
enum TypebotSessionStatus {
|
||||
open
|
||||
opened
|
||||
closed
|
||||
paused
|
||||
}
|
||||
@@ -292,7 +292,7 @@ model TypebotSession {
|
||||
remoteJid String @db.VarChar(100)
|
||||
pushName String? @db.VarChar(100)
|
||||
sessionId String @db.VarChar(100)
|
||||
status String @db.VarChar(100)
|
||||
status TypebotSessionStatus
|
||||
prefilledVariables Json? @db.JsonB
|
||||
awaitUser Boolean @default(false) @db.Boolean
|
||||
createdAt DateTime? @default(now()) @db.Timestamp
|
||||
|
||||
Reference in New Issue
Block a user