feat(MED-105): organize env specific required migrations
This commit is contained in:
@@ -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;
|
||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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(
|
||||||
@@ -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(
|
||||||
4
supabase/migrations-env-specific/README.md
Normal file
4
supabase/migrations-env-specific/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Migrations that require env specific parameters.
|
||||||
|
|
||||||
|
- JOBS_API_TOKEN
|
||||||
|
- app deploy public or internal URL
|
||||||
Reference in New Issue
Block a user