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

@ -3,7 +3,7 @@ FROM node:20-alpine AS builder
RUN apk update && \
apk add git ffmpeg wget curl bash openssl
LABEL version="2.2.0" description="Api to control whatsapp features through http requests."
LABEL version="2.2.1" description="Api to control whatsapp features through http requests."
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"
LABEL contact="contato@atendai.com"

868
package-lock.json generated

File diff suppressed because it is too large Load Diff

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");