Описание изменений

This commit is contained in:
2025-03-14 12:02:59 +03:00
parent 4abc48a7be
commit 14033bf9d1
23 changed files with 1564 additions and 1326 deletions

19
backend/db/index.js Normal file
View File

@@ -0,0 +1,19 @@
const createGuestMessagesTable = require('./migrations/create_guest_messages_table');
async function initDatabase() {
try {
// ... существующий код ...
// Выполняем миграции
await pool.query(createUsersTable);
await pool.query(createSessionTable);
await pool.query(createNoncesTable);
await pool.query(createMessagesTable);
await pool.query(createConversationsTable);
await pool.query(createGuestMessagesTable);
// ... существующий код ...
} catch (error) {
// ... существующий код ...
}
}