Adição de migrations #1

Merged
rafael.lopes merged 16 commits from dev into master 2026-05-27 16:06:43 -03:00
2 changed files with 22 additions and 4 deletions
Showing only changes of commit 12e79cc6d6 - Show all commits

16
.gitignore vendored
View File

@ -1,7 +1,17 @@
node_modules node_modules
dist dist
.env*
*.log
.DS_Store
# Backend Specific Ignore
backend/node_modules
backend/dist
backend/whatsapp-session
backend/whatsapp-chats-persist.json
backend/all-chats-dump.json
backend/test-api-out.json
# Frontend Specific Ignore
frontend/node_modules frontend/node_modules
frontend/dist frontend/dist
.DS_Store
.env.development
.env.production

View File

@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS whatsapp_chat_atribuicoes (
id SERIAL PRIMARY KEY,
chat_id VARCHAR(255) NOT NULL,
user_id SERIAL REFERENCES usuarios(id) ON DELETE CASCADE,
area_id SERIAL REFERENCES areas(id) ON DELETE SET NULL,
assigned_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
UNIQUE(chat_id)
);