diff --git a/database/migrations/schema/034_partman_schema.sql b/database/migrations/schema/034_partman_schema.sql new file mode 100644 index 00000000..d63723a8 --- /dev/null +++ b/database/migrations/schema/034_partman_schema.sql @@ -0,0 +1,12 @@ +drop extension pg_partman; +create schema partman; +create extension pg_partman schema partman; +drop table template_public_package_views; +select partman.create_parent('public.package_views', 'day', 'native', 'monthly', p_start_partition := current_date::text); + +---- create above / drop below ---- + +drop extension pg_partman; +drop schema partman cascade; +create extension pg_partman; +select create_parent('public.package_views', 'day', 'native', 'monthly', p_start_partition := current_date::text);