Process Shopify webhooks asynchronously
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE shopify_webhook_event
|
||||
DROP CONSTRAINT IF EXISTS chk_shopify_webhook_event_status;
|
||||
|
||||
ALTER TABLE shopify_webhook_event
|
||||
ADD CONSTRAINT chk_shopify_webhook_event_status
|
||||
CHECK (status IN ('received', 'processing', 'processed', 'duplicate', 'failed'));
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_shopify_webhook_event_processing
|
||||
ON shopify_webhook_event(status, received_at, id);
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user