Update version to 2.2.1, enhance database migration, and update dependencies

- Updated version labels in Dockerfile and package-lock.json to 2.2.1.
- Added a new column `wavoipToken` to the `Setting` table in the PostgreSQL migration.
- Implemented a cleanup step to remove duplicate records in the `Chat` table before creating a unique index.
- Upgraded various package dependencies to their latest versions for improved functionality and security.
This commit is contained in:
Davidson Gomes
2025-01-21 17:39:03 -03:00
parent d7b4965d60
commit b0219e5e5a
3 changed files with 421 additions and 455 deletions

View File

@@ -7,5 +7,11 @@
-- AlterTable
ALTER TABLE "Setting" ADD COLUMN "wavoipToken" VARCHAR(100);
-- Remover registros duplicados antes de criar o índice único
DELETE FROM "Chat" a USING "Chat" b
WHERE a.ctid < b.ctid
AND a.remoteJid = b.remoteJid
AND a.instanceId = b.instanceId;
-- CreateIndex
CREATE UNIQUE INDEX "Chat_remoteJid_instanceId_key" ON "Chat"("remoteJid", "instanceId");