Changeset 2e247e4 in Klonkt for src/config
- Timestamp:
- 06/19/2026 12:00:48 AM (3 months ago)
- Branches:
- main
- Children:
- 91094a4
- Parents:
- 255e3d3
- File:
-
- 1 edited
-
src/config/database.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/config/database.js
r255e3d3 r2e247e4 188 188 // Tags van de originele post — getoond in de cirkel (comma-separated string). 189 189 ensureColumn('remote_posts', 'tags', 'TEXT'); 190 191 // Nieuwsbrief / mailinglijst (premium). Abonnees per site; double opt-in als SMTP 192 // er is (status 'pending' tot bevestigd), anders single opt-in ('confirmed'). 193 // 'unsub' = uitgeschreven. token = confirm/unsubscribe-sleutel (in de e-maillinks). 194 db.exec(` 195 CREATE TABLE IF NOT EXISTS subscribers ( 196 id TEXT PRIMARY KEY, 197 site_id TEXT NOT NULL, 198 email TEXT NOT NULL, 199 status TEXT NOT NULL DEFAULT 'pending', 200 source TEXT DEFAULT 'widget', 201 token TEXT NOT NULL, 202 created_at DATETIME DEFAULT CURRENT_TIMESTAMP, 203 confirmed_at DATETIME, 204 UNIQUE(site_id, email) 205 ); 206 CREATE INDEX IF NOT EXISTS idx_subscribers_site_status ON subscribers(site_id, status); 207 `); 208 209 // Verstuurde nieuwsbrieven (historie + aantallen). 210 db.exec(` 211 CREATE TABLE IF NOT EXISTS newsletters ( 212 id TEXT PRIMARY KEY, 213 site_id TEXT NOT NULL, 214 subject TEXT NOT NULL, 215 body TEXT NOT NULL, 216 sent_at DATETIME DEFAULT CURRENT_TIMESTAMP, 217 recipient_count INTEGER DEFAULT 0 218 ); 219 `); 190 220 } 191 221
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)