-- Your SQL goes here
CREATE TABLE IF NOT EXISTS public.event_log_y2024m08 PARTITION OF public.event_log FOR
VALUES
FROM ('2024-08-01') TO ('2024-09-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2024m09 PARTITION OF public.event_log FOR
VALUES
FROM ('2024-09-01') TO ('2024-10-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2024m10 PARTITION OF public.event_log FOR
VALUES
FROM ('2024-10-01') TO ('2024-11-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2024m11 PARTITION OF public.event_log FOR
VALUES
FROM ('2024-11-01') TO ('2024-12-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2024m12 PARTITION OF public.event_log FOR
VALUES
FROM ('2024-12-01') TO ('2025-01-01');

------------ Parititions for 2025 -----------
CREATE TABLE IF NOT EXISTS public.event_log_y2025m01 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-01-01') TO ('2025-02-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m02 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-02-01') TO ('2025-03-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m03 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-03-01') TO ('2025-04-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m04 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-04-01') TO ('2025-05-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m05 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-05-01') TO ('2025-06-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m06 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-06-01') TO ('2025-07-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m07 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-07-01') TO ('2025-08-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m08 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-08-01') TO ('2025-09-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m09 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-09-01') TO ('2025-10-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m10 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-10-01') TO ('2025-11-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m11 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-11-01') TO ('2025-12-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2025m12 PARTITION OF public.event_log FOR
VALUES
FROM ('2025-12-01') TO ('2026-01-01');

------------ Parititions for 2026 -----------
CREATE TABLE IF NOT EXISTS public.event_log_y2026m01 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-01-01') TO ('2026-02-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m02 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-02-01') TO ('2026-03-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m03 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-03-01') TO ('2026-04-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m04 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-04-01') TO ('2026-05-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m05 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-05-01') TO ('2026-06-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m06 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-06-01') TO ('2026-07-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m07 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-07-01') TO ('2026-08-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m08 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-08-01') TO ('2026-09-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m09 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-09-01') TO ('2026-10-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m10 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-10-01') TO ('2026-11-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m11 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-11-01') TO ('2026-12-01');

CREATE TABLE IF NOT EXISTS public.event_log_y2026m12 PARTITION OF public.event_log FOR
VALUES
FROM ('2026-12-01') TO ('2027-01-01');
