0006_lowly_sinister_six.sql 809 B

123456789101112131415161718
  1. CREATE TABLE `workflow_suggestions` (
  2. `id` int AUTO_INCREMENT NOT NULL,
  3. `workflowId` varchar(64) NOT NULL,
  4. `suggestedNodeType` varchar(64) NOT NULL,
  5. `label` varchar(255) NOT NULL,
  6. `description` text,
  7. `config` json,
  8. `faqQuestion` text,
  9. `frequency` int NOT NULL DEFAULT 0,
  10. `suggestionStatus` enum('pending','approved','declined','waiting') NOT NULL DEFAULT 'pending',
  11. `reviewedById` int,
  12. `reviewedAt` timestamp,
  13. `createdAt` timestamp NOT NULL DEFAULT (now()),
  14. `updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
  15. CONSTRAINT `workflow_suggestions_id` PRIMARY KEY(`id`)
  16. );
  17. --> statement-breakpoint
  18. ALTER TABLE `workflow_nodes` MODIFY COLUMN `type` enum('greeting','intent','response','condition','escalation','action','end','customer_data','sales_order','guardrail') NOT NULL;