max / makenotwork
| 1 | -- Fan+ perks: signature columns + denormalised perk flags. |
| 2 | -- |
| 3 | -- `is_fan_plus` and `is_creator` mirror the latest MNW `/oauth/userinfo` |
| 4 | -- `perks` snapshot for this user. They're cached here so post rendering can |
| 5 | -- gate the + badge and signature display by JOINing against users instead of |
| 6 | -- making per-post calls to MNW. Refreshed on login + `POST /auth/refresh` |
| 7 | -- (see `src/auth.rs`). |
| 8 | -- |
| 9 | -- Signature: free-text markdown shown beneath each post by Fan+ subscribers. |
| 10 | -- We store both the source markdown and pre-rendered HTML, matching the |
| 11 | -- pattern used for posts. Render at save time only. |
| 12 | |
| 13 | users |
| 14 | ADD COLUMN signature_markdown TEXT, |
| 15 | ADD COLUMN signature_html TEXT, |
| 16 | ADD COLUMN is_fan_plus BOOLEAN NOT NULL DEFAULT FALSE, |
| 17 | ADD COLUMN is_creator BOOLEAN NOT NULL DEFAULT FALSE; |
| 18 |