|
| 1 | +/* |
| 2 | + Warnings: |
| 3 | +
|
| 4 | + - You are about to alter the column `createdAt` on the `Chat` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 5 | + - You are about to alter the column `updatedAt` on the `Chat` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 6 | + - You are about to alter the column `createdAt` on the `Chatwoot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 7 | + - You are about to alter the column `updatedAt` on the `Chatwoot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 8 | + - You are about to alter the column `createdAt` on the `Contact` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 9 | + - You are about to alter the column `updatedAt` on the `Contact` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 10 | + - You are about to alter the column `createdAt` on the `Dify` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 11 | + - You are about to alter the column `updatedAt` on the `Dify` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 12 | + - You are about to alter the column `createdAt` on the `DifySetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 13 | + - You are about to alter the column `updatedAt` on the `DifySetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 14 | + - You are about to alter the column `createdAt` on the `EvolutionBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 15 | + - You are about to alter the column `updatedAt` on the `EvolutionBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 16 | + - You are about to alter the column `createdAt` on the `EvolutionBotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 17 | + - You are about to alter the column `updatedAt` on the `EvolutionBotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 18 | + - You are about to alter the column `createdAt` on the `Flowise` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 19 | + - You are about to alter the column `updatedAt` on the `Flowise` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 20 | + - You are about to alter the column `createdAt` on the `FlowiseSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 21 | + - You are about to alter the column `updatedAt` on the `FlowiseSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 22 | + - You are about to alter the column `disconnectionAt` on the `Instance` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 23 | + - You are about to alter the column `createdAt` on the `Instance` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 24 | + - You are about to alter the column `updatedAt` on the `Instance` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 25 | + - You are about to alter the column `createdAt` on the `IntegrationSession` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 26 | + - You are about to alter the column `updatedAt` on the `IntegrationSession` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 27 | + - You are about to alter the column `createdAt` on the `IsOnWhatsapp` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 28 | + - You are about to alter the column `updatedAt` on the `IsOnWhatsapp` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 29 | + - You are about to alter the column `createdAt` on the `Label` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 30 | + - You are about to alter the column `updatedAt` on the `Label` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 31 | + - You are about to alter the column `createdAt` on the `Media` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 32 | + - You are about to alter the column `createdAt` on the `OpenaiBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 33 | + - You are about to alter the column `updatedAt` on the `OpenaiBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 34 | + - You are about to alter the column `createdAt` on the `OpenaiCreds` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 35 | + - You are about to alter the column `updatedAt` on the `OpenaiCreds` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 36 | + - You are about to alter the column `createdAt` on the `OpenaiSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 37 | + - You are about to alter the column `updatedAt` on the `OpenaiSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 38 | + - You are about to alter the column `createdAt` on the `Proxy` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 39 | + - You are about to alter the column `updatedAt` on the `Proxy` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 40 | + - You are about to alter the column `createdAt` on the `Rabbitmq` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 41 | + - You are about to alter the column `updatedAt` on the `Rabbitmq` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 42 | + - You are about to alter the column `createdAt` on the `Session` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 43 | + - You are about to alter the column `createdAt` on the `Setting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 44 | + - You are about to alter the column `updatedAt` on the `Setting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 45 | + - You are about to alter the column `createdAt` on the `Sqs` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 46 | + - You are about to alter the column `updatedAt` on the `Sqs` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 47 | + - You are about to alter the column `createdAt` on the `Template` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 48 | + - You are about to alter the column `updatedAt` on the `Template` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 49 | + - You are about to alter the column `createdAt` on the `Typebot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 50 | + - You are about to alter the column `updatedAt` on the `Typebot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 51 | + - You are about to alter the column `createdAt` on the `TypebotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 52 | + - You are about to alter the column `updatedAt` on the `TypebotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 53 | + - You are about to alter the column `createdAt` on the `Webhook` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 54 | + - You are about to alter the column `updatedAt` on the `Webhook` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 55 | + - You are about to alter the column `createdAt` on the `Websocket` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 56 | + - You are about to alter the column `updatedAt` on the `Websocket` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`. |
| 57 | +
|
| 58 | +*/ |
| 59 | +-- AlterTable |
| 60 | +ALTER TABLE `Chat` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 61 | + MODIFY `updatedAt` TIMESTAMP NULL; |
| 62 | + |
| 63 | +-- AlterTable |
| 64 | +ALTER TABLE `Chatwoot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 65 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 66 | + |
| 67 | +-- AlterTable |
| 68 | +ALTER TABLE `Contact` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 69 | + MODIFY `updatedAt` TIMESTAMP NULL; |
| 70 | + |
| 71 | +-- AlterTable |
| 72 | +ALTER TABLE `Dify` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 73 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 74 | + |
| 75 | +-- AlterTable |
| 76 | +ALTER TABLE `DifySetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 77 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 78 | + |
| 79 | +-- AlterTable |
| 80 | +ALTER TABLE `EvolutionBot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 81 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 82 | + |
| 83 | +-- AlterTable |
| 84 | +ALTER TABLE `EvolutionBotSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 85 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 86 | + |
| 87 | +-- AlterTable |
| 88 | +ALTER TABLE `Flowise` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 89 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 90 | + |
| 91 | +-- AlterTable |
| 92 | +ALTER TABLE `FlowiseSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 93 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 94 | + |
| 95 | +-- AlterTable |
| 96 | +ALTER TABLE `Instance` MODIFY `disconnectionAt` TIMESTAMP NULL, |
| 97 | + MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 98 | + MODIFY `updatedAt` TIMESTAMP NULL; |
| 99 | + |
| 100 | +-- AlterTable |
| 101 | +ALTER TABLE `IntegrationSession` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 102 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 103 | + |
| 104 | +-- AlterTable |
| 105 | +ALTER TABLE `IsOnWhatsapp` MODIFY `createdAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 106 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 107 | + |
| 108 | +-- AlterTable |
| 109 | +ALTER TABLE `Label` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 110 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 111 | + |
| 112 | +-- AlterTable |
| 113 | +ALTER TABLE `Media` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP; |
| 114 | + |
| 115 | +-- AlterTable |
| 116 | +ALTER TABLE `Message` MODIFY `status` VARCHAR(30) NULL; |
| 117 | + |
| 118 | +-- AlterTable |
| 119 | +ALTER TABLE `OpenaiBot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 120 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 121 | + |
| 122 | +-- AlterTable |
| 123 | +ALTER TABLE `OpenaiCreds` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 124 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 125 | + |
| 126 | +-- AlterTable |
| 127 | +ALTER TABLE `OpenaiSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 128 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 129 | + |
| 130 | +-- AlterTable |
| 131 | +ALTER TABLE `Proxy` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 132 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 133 | + |
| 134 | +-- AlterTable |
| 135 | +ALTER TABLE `Rabbitmq` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 136 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 137 | + |
| 138 | +-- AlterTable |
| 139 | +ALTER TABLE `Session` MODIFY `createdAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; |
| 140 | + |
| 141 | +-- AlterTable |
| 142 | +ALTER TABLE `Setting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 143 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 144 | + |
| 145 | +-- AlterTable |
| 146 | +ALTER TABLE `Sqs` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 147 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 148 | + |
| 149 | +-- AlterTable |
| 150 | +ALTER TABLE `Template` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 151 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 152 | + |
| 153 | +-- AlterTable |
| 154 | +ALTER TABLE `Typebot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 155 | + MODIFY `updatedAt` TIMESTAMP NULL; |
| 156 | + |
| 157 | +-- AlterTable |
| 158 | +ALTER TABLE `TypebotSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 159 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 160 | + |
| 161 | +-- AlterTable |
| 162 | +ALTER TABLE `Webhook` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 163 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 164 | + |
| 165 | +-- AlterTable |
| 166 | +ALTER TABLE `Websocket` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 167 | + MODIFY `updatedAt` TIMESTAMP NOT NULL; |
| 168 | + |
| 169 | +-- CreateTable |
| 170 | +CREATE TABLE `Pusher` ( |
| 171 | + `id` VARCHAR(191) NOT NULL, |
| 172 | + `enabled` BOOLEAN NOT NULL DEFAULT false, |
| 173 | + `appId` VARCHAR(100) NOT NULL, |
| 174 | + `key` VARCHAR(100) NOT NULL, |
| 175 | + `secret` VARCHAR(100) NOT NULL, |
| 176 | + `cluster` VARCHAR(100) NOT NULL, |
| 177 | + `useTLS` BOOLEAN NOT NULL DEFAULT false, |
| 178 | + `events` JSON NOT NULL, |
| 179 | + `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, |
| 180 | + `updatedAt` TIMESTAMP NOT NULL, |
| 181 | + `instanceId` VARCHAR(191) NOT NULL, |
| 182 | + |
| 183 | + UNIQUE INDEX `Pusher_instanceId_key`(`instanceId`), |
| 184 | + PRIMARY KEY (`id`) |
| 185 | +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
| 186 | + |
| 187 | +-- AddForeignKey |
| 188 | +ALTER TABLE `Pusher` ADD CONSTRAINT `Pusher_instanceId_fkey` FOREIGN KEY (`instanceId`) REFERENCES `Instance`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; |
0 commit comments