Fix mobile scroll jump, add comments, rename to Котограм

This commit is contained in:
2026-05-29 13:58:42 +03:00
parent 4bf9ea22dd
commit 3664b60f10
16 changed files with 352 additions and 34 deletions

View File

@@ -62,6 +62,16 @@ export async function initDb(): Promise<SqlJsDatabase> {
)
`);
db.run(`
CREATE TABLE IF NOT EXISTS comments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
cat_id INTEGER NOT NULL REFERENCES cats(id) ON DELETE CASCADE,
user_id INTEGER NOT NULL REFERENCES users(id),
text TEXT NOT NULL,
created_at TEXT DEFAULT (datetime('now'))
)
`);
saveDb();
return db;
}