added changes ready to ship

This commit is contained in:
tusuii
2026-02-21 12:06:16 +05:30
parent 1788e364f1
commit 82077d38e6
39 changed files with 694 additions and 5600 deletions

View File

@@ -98,6 +98,20 @@ export async function initDB() {
)
`);
await conn.query(`
CREATE TABLE IF NOT EXISTS notifications (
id VARCHAR(36) PRIMARY KEY,
user_id VARCHAR(36) NOT NULL,
type VARCHAR(50) NOT NULL,
title VARCHAR(255) NOT NULL,
message TEXT,
link VARCHAR(255),
is_read BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
)
`);
console.log('✅ Database tables initialized');
} finally {
conn.release();