PATH:
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
defence360agent
/
migrations
/
__pycache__
/
Editing: 192_add_wordpress_incident_unique_index.cpython-311.pyc
� ���iS � � � d Z dd�Zdd�ZdS )a Add unique composite index to wordpress_incident table for deduplication. This migration adds a unique index on the fields used to identify duplicate incidents (abuser, name, plugin, rule, severity, domain), similar to the aggregation key used in the resident agent's aggregate plugin. Fc �Z � | j d }| � |ddddddd� � � d S )z6Add unique composite index for incident deduplication.�wordpress_incident�abuser�name�plugin�rule�severity�domainT)�uniqueN)�orm� add_index��migrator�database�fake�kwargs�WordpressIncidents �w/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/192_add_wordpress_incident_unique_index.py�migrater sQ � � ��%9�:�� ����������� � � � � � � c �V � | j d }| � |dddddd� � dS ) z"Remove the unique composite index.r r r r r r r N)r � drop_indexr s r �rollbackr sG � � ��%9�:������������� � � � r N)F)�__doc__r r � r r �<module>r sA ��� �� � � �$� � � � � r
SAVE
CANCEL