After persist the live activity data for welcome5
This commit is contained in:
parent
4f0e0b22ef
commit
5c7f044f2a
@ -2794,7 +2794,7 @@ CREATE TABLE IF NOT EXISTS marketing_live_activity_settings (
|
||||
cache_ttl_seconds INT NOT NULL DEFAULT 12 CHECK (cache_ttl_seconds > 0),
|
||||
max_synthetic_withdrawals INT NOT NULL DEFAULT 12 CHECK (max_synthetic_withdrawals >= 0 AND max_synthetic_withdrawals <= 100),
|
||||
synthetic_withdrawal_amounts INT[] NOT NULL DEFAULT ARRAY[20,35,50,80,100,120,200,250,300,450,500,800],
|
||||
withdrawal_real_window_hours INT NOT NULL DEFAULT 48 CHECK (withdrawal_real_window_hours > 0 AND withdrawal_real_window_hours <= 720),
|
||||
withdrawal_real_window_hours INT NOT NULL DEFAULT 48 CHECK (withdrawal_real_window_hours > 0),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
@ -2839,7 +2839,19 @@ BEGIN
|
||||
) THEN
|
||||
ALTER TABLE marketing_live_activity_settings
|
||||
ADD COLUMN withdrawal_real_window_hours INT NOT NULL DEFAULT 48
|
||||
CHECK (withdrawal_real_window_hours > 0 AND withdrawal_real_window_hours <= 720);
|
||||
CHECK (withdrawal_real_window_hours > 0);
|
||||
END IF;
|
||||
-- Drop legacy upper bound (<= 720) if present so admins can set any positive hours.
|
||||
IF EXISTS (
|
||||
SELECT 1 FROM pg_constraint
|
||||
WHERE conrelid = 'public.marketing_live_activity_settings'::regclass
|
||||
AND conname = 'marketing_live_activity_settings_withdrawal_real_window_hours_check'
|
||||
) THEN
|
||||
ALTER TABLE marketing_live_activity_settings
|
||||
DROP CONSTRAINT marketing_live_activity_settings_withdrawal_real_window_hours_check;
|
||||
ALTER TABLE marketing_live_activity_settings
|
||||
ADD CONSTRAINT marketing_live_activity_settings_withdrawal_real_window_hours_check
|
||||
CHECK (withdrawal_real_window_hours > 0);
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
|
||||
@ -250,7 +250,7 @@ export const marketingLiveActivitySettingsBodySchema = atLeastOneField(
|
||||
.min(1)
|
||||
.max(50)
|
||||
.optional(),
|
||||
withdrawalRealWindowHours: z.number().int().positive().max(720).optional(),
|
||||
withdrawalRealWindowHours: z.number().int().positive().optional(),
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@ -2189,7 +2189,7 @@ export const en = {
|
||||
'Cap of fictive rows added to the withdrawals feed (0–100). Same enable/threshold as Live Activity.',
|
||||
withdrawalRealWindowHours: 'Real withdrawals window (hours)',
|
||||
withdrawalRealWindowHoursHelper:
|
||||
'Only show real completed payouts newer than this (default 48). Older ones drop out so the feed can rotate with synthetics.',
|
||||
'Only show real completed payouts newer than this many hours (default 48). No upper cap — older ones drop out so the feed can rotate with synthetics.',
|
||||
syntheticWithdrawalAmounts: 'Withdrawal amounts',
|
||||
syntheticWithdrawalAmountsHelper:
|
||||
'Comma-separated display amounts (e.g. 20, 35, 50, 100). Rotated across active personas.',
|
||||
|
||||
@ -2209,7 +2209,7 @@ export const fr = {
|
||||
'Plafond de lignes fictives ajoutées au feed retraits (0–100). Même activation/seuil que Live Activity.',
|
||||
withdrawalRealWindowHours: 'Fenêtre retraits réels (heures)',
|
||||
withdrawalRealWindowHoursHelper:
|
||||
'N’afficher que les vrais retraits completed plus récents que cette durée (défaut 48 h). Les plus anciens sortent pour laisser tourner les fictifs.',
|
||||
'N’afficher que les vrais retraits completed plus récents que ce nombre d’heures (défaut 48). Pas de plafond — les plus anciens sortent pour laisser tourner les fictifs.',
|
||||
syntheticWithdrawalAmounts: 'Montants de retraits',
|
||||
syntheticWithdrawalAmountsHelper:
|
||||
'Montants affichés séparés par des virgules (ex. 20, 35, 50, 100). Rotation sur les personas actifs.',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user