feat(13-01): seed pax8-daily sync schedule via migration 096
- Idempotent INSERT ... WHERE NOT EXISTS seed of the pax8-daily row (cron 0 4 * * *, is_enabled false), mirroring migration 089's style - Covers existing installs since createDefaultSchedules() only seeds a virgin sync_schedules table - Applied to running dev DB and verified idempotent (second run = 0 rows)
This commit is contained in:
parent
b168d44585
commit
230296c137
1 changed files with 13 additions and 0 deletions
13
migrations/096_pax8_daily_schedule.sql
Normal file
13
migrations/096_pax8_daily_schedule.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
-- Migration 096: Seed the pax8-daily sync schedule.
|
||||||
|
--
|
||||||
|
-- The sync_scheduler.createDefaultSchedules() path only seeds defaults on a
|
||||||
|
-- virgin sync_schedules table; this migration covers existing installs.
|
||||||
|
-- sync_schedules has no unique constraint on name, so guard with NOT EXISTS
|
||||||
|
-- (same pattern as migration 089's appgate-sessions/appgate-daily seeds).
|
||||||
|
|
||||||
|
INSERT INTO sync_schedules (id, name, description, cron_expression, sync_type, is_enabled)
|
||||||
|
SELECT 'pax8-daily',
|
||||||
|
'PAX8 Daily Sync',
|
||||||
|
'Full PAX8 sync — companies, subscriptions, products, orders, and company matching, daily at 4 AM.',
|
||||||
|
'0 4 * * *', 'pax8-daily', false
|
||||||
|
WHERE NOT EXISTS (SELECT 1 FROM sync_schedules WHERE name = 'PAX8 Daily Sync');
|
||||||
Loading…
Add table
Add a link
Reference in a new issue