Hi, I’m trying to achieve the following in Ash (3.1)
-- Create the parent table
CREATE TABLE telemetry_logs (
id BIGSERIAL,
event TEXT,
duration INTEGER,
inserted_at TIMESTAMP
) PARTITION BY RANGE (inserted_at);
-- Create partitions for each month
CREATE TABLE telemetry_logs_y2024m07 PARTITION OF telemetry_logs
FOR VALUES FROM ('2024-07-01') TO ('2024-08-01');
CREATE TABLE telemetry_logs_y2024m08 PARTITION OF telemetry_logs
FOR VALUES FROM ('2024-08-01') TO ('2024-09-01');
Question
- Is it possible to do
PARTITION BY
in the Ash Domain? - I reckon that the child partitions are created manually via
Repo.query
?
Best regards
Terry