feat(MED-105): organize env specific required migrations

This commit is contained in:
2025-08-28 14:54:51 +03:00
parent da7f574234
commit d072226a5c
6 changed files with 9 additions and 13 deletions

View File

@@ -0,0 +1,3 @@
-- Enable required extensions for cron jobs and HTTP requests
create extension if not exists pg_cron;
create extension if not exists pg_net;

View File

@@ -1,5 +1,3 @@
create extension if not exists pg_net;
create or replace function medreport.medipost_retry_dispatch( create or replace function medreport.medipost_retry_dispatch(
order_id text order_id text
) )

View File

@@ -1,4 +1,3 @@
-- Parameters order_id
CREATE OR REPLACE FUNCTION medreport.send_medipost_test_response_for_order(medusa_order_id text) CREATE OR REPLACE FUNCTION medreport.send_medipost_test_response_for_order(medusa_order_id text)
RETURNS void RETURNS void
LANGUAGE plpgsql LANGUAGE plpgsql

View File

@@ -1,12 +1,8 @@
-- Enable required extensions for cron jobs and HTTP requests
create extension if not exists pg_cron;
create extension if not exists pg_net;
-- Schedule the test-medipost-responses job to run every 15 minutes -- Schedule the test-medipost-responses job to run every 15 minutes
select select
cron.schedule( cron.schedule(
'send-test-medipost-responses-every-15-minutes', -- Unique job name 'send-test-medipost-responses-every-15-minutes',
'*/15 * * * *', -- Cron schedule: every 15 minutes '*/15 * * * *',
$$ $$
select select
net.http_post( net.http_post(

View File

@@ -1,7 +1,3 @@
-- Enable required extensions for cron jobs and HTTP requests
create extension if not exists pg_cron;
create extension if not exists pg_net;
-- Schedule the sync-analysis-results job to run every 15 minutes -- Schedule the sync-analysis-results job to run every 15 minutes
select select
cron.schedule( cron.schedule(

View File

@@ -0,0 +1,4 @@
Migrations that require env specific parameters.
- JOBS_API_TOKEN
- app deploy public or internal URL