mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Create partition only if it doesn't exist
This commit is contained in:
parent
0c289205de
commit
445042c0f4
@ -1047,7 +1047,7 @@ def create_partition(start, end=None, partition_label=None):
|
||||
#):
|
||||
for tblname in ('main_jobevent',):
|
||||
cursor.execute(
|
||||
f'CREATE TABLE {tblname}_{partition_label} '
|
||||
f'CREATE TABLE IF NOT EXISTS {tblname}_{partition_label} '
|
||||
f'PARTITION OF {tblname} '
|
||||
f'FOR VALUES FROM (\'{start_timestamp}\') to (\'{end_timestamp}\');'
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user