feat: Implement comments, notifications, and custom emojis with new API routes, UI components, and database migrations.

This commit is contained in:
x
2026-01-25 03:48:24 +01:00
parent 595118c2c8
commit d903ce8b98
18 changed files with 1900 additions and 44 deletions

22
debug/init_comments.mjs Normal file
View File

@@ -0,0 +1,22 @@
import db from "../src/inc/sql.mjs";
import { promises as fs } from "fs";
(async () => {
try {
const migration = await fs.readFile("./migration_comments.sql", "utf-8");
console.log("Applying migration...");
// Split by semicolon to handle multiple statements if the driver requires it,
// but postgres.js usually handles simple files well or we can execute as one block
// if it's just DDL. However, postgres.js template literal usually prefers single statements
// or we can use `db.file` if available, or just execute the string.
// Simple approach: execute the whole string
await db.unsafe(migration);
console.log("Migration applied successfully.");
process.exit(0);
} catch (e) {
console.error("Migration failed:", e);
process.exit(1);
}
})();