feat: Add last_verified timestamp to groups table

main
borja (aider) 3 months ago
parent 0154ffc8d0
commit c9c990b815

@ -33,7 +33,8 @@ export function initializeDatabase() {
CREATE TABLE IF NOT EXISTS groups (
id TEXT PRIMARY KEY,
community_id TEXT NOT NULL,
name TEXT
name TEXT,
last_verified TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
`);
}

@ -31,6 +31,13 @@ describe('Database', () => {
expect(tasksColumns).toContain('description');
expect(tasksColumns).toContain('due_date');
// Verify groups table has last_verified column
const groupsColumns = db
.query("PRAGMA table_info(groups)")
.all()
.map((c: any) => c.name);
expect(groupsColumns).toContain('last_verified');
// Verify foreign key constraint
const fkInfo = db
.query("PRAGMA foreign_key_list(task_assignments)")

Loading…
Cancel
Save