Achievement badges + milestone credit bonuses
- Idempotent one-time credit bonus per milestone (payouts/firstBuyer/level2/level3): 10/25/50/100 cr - Overview badges strip (unlockable medals) with canvas share-to-image (username overlaid) - Newly-unlocked milestones toast the bonus on next dashboard load Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,8 @@ async function bootstrap() {
|
||||
granted_welcome TINYINT NOT NULL DEFAULT 0,
|
||||
updated BIGINT NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`);
|
||||
const alterSafe0 = async sql => { try { await q(sql); } catch (e) { if (!['ER_DUP_FIELDNAME', 'ER_DUP_KEYNAME'].includes(e.code)) throw e; } };
|
||||
await alterSafe0('ALTER TABLE earned_credits ADD COLUMN milestones VARCHAR(255) NULL'); // comma-joined granted milestone keys
|
||||
// additive columns (MySQL 8 has no IF NOT EXISTS for columns)
|
||||
const alterSafe = async sql => {
|
||||
try { await q(sql); }
|
||||
|
||||
Reference in New Issue
Block a user