From d90d0fb50312a3702d3ce58c99d3490c872521b7 Mon Sep 17 00:00:00 2001 From: Jim Ladd Date: Wed, 24 Feb 2021 16:48:31 -0800 Subject: [PATCH] fix initial partition creation * call create_partition correctly (include tblname) * reference 'awx_epoch' --- awx/main/migrations/0124_event_partitions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/migrations/0124_event_partitions.py b/awx/main/migrations/0124_event_partitions.py index c587c7c83c..772cd4bd48 100644 --- a/awx/main/migrations/0124_event_partitions.py +++ b/awx/main/migrations/0124_event_partitions.py @@ -61,8 +61,8 @@ def migrate_event_data(apps, schema_editor): current_time = now() # .. as well as initial partition containing all existing events - epoch = datetime(2000, 1, 1, 0, 0) - create_partition(epoch, current_time, 'old_events') + awx_epoch = datetime(2000, 1, 1, 0, 0) # .. so to speak + create_partition(tblname, awx_epoch, current_time, 'old_events') # .. and first partition # .. which is a special case, as it only covers remainder of current hour