Add bridge backend for sync
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
8
pkg/coredata/migrations/20260201T120000Z.sql
Normal file
8
pkg/coredata/migrations/20260201T120000Z.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Add failure tracking columns to iam_scim_bridges table
|
||||
ALTER TABLE iam_scim_bridges ADD COLUMN consecutive_failures INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE iam_scim_bridges ADD COLUMN total_sync_count INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE iam_scim_bridges ADD COLUMN total_failure_count INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- Drop old index and create new one that covers all processable states
|
||||
DROP INDEX IF EXISTS idx_iam_scim_bridges_next_sync;
|
||||
CREATE INDEX idx_iam_scim_bridges_next_sync ON iam_scim_bridges (next_sync_at) WHERE state IN ('ACTIVE', 'FAILED', 'SYNCING');
|
||||
Reference in New Issue
Block a user