Changeset 2e9773f in Klonkt
- Timestamp:
- 06/24/2026 02:19:18 PM (3 months ago)
- Branches:
- main
- Children:
- 59f0170
- Parents:
- 075185a
- File:
-
- 1 edited
-
src/config/database.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/config/database.js
r075185a r2e9773f 267 267 created_at DATETIME DEFAULT CURRENT_TIMESTAMP 268 268 ); 269 CREATE INDEX IF NOT EXISTS idx_unotif_user ON user_notifications(user_id, read, created_at); 270 `); 269 `); 270 // Older DBs may have a user_notifications table predating these columns — add 271 // them before the index (which references `read`), else boot crashes. 272 ensureColumn('user_notifications', 'type', 'TEXT'); 273 ensureColumn('user_notifications', 'actor_id', 'TEXT'); 274 ensureColumn('user_notifications', 'actor_name', 'TEXT'); 275 ensureColumn('user_notifications', 'post_slug', 'TEXT'); 276 ensureColumn('user_notifications', 'post_title', 'TEXT'); 277 ensureColumn('user_notifications', 'url', 'TEXT'); 278 ensureColumn('user_notifications', 'read', 'INTEGER DEFAULT 0'); 279 db.exec('CREATE INDEX IF NOT EXISTS idx_unotif_user ON user_notifications(user_id, read, created_at);'); 271 280 272 281 // Link-in-bio click statistics (premium #6). One counter per (site, url); the
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)