Fix mobile scroll jump, add comments, rename to Котограм
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user