Edit File: 182_remove_constraints_from_icontact_throttle.cpython-311.pyc
� �*vh� � �J � d Z ddlmZmZmZ G d� de� � Zd d�Zd d�ZdS ) zl Drop constrains for icontact_throttle.message_type, since correlation server can set any type (DEF-19971). � )� CharField�IntegerField�Modelc �X � e Zd Z G d� d� � Z ed�� � Z ed�� � ZdS )�IContactThrottlec � � e Zd ZdZdS )�IContactThrottle.Meta�icontact_throttleN)�__name__� __module__�__qualname__�db_table� � �}/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/182_remove_constraints_from_icontact_throttle.py�Metar s � � � � � �&���r r T)�primary_keyr )�defaultN)r r r r r �message_typer � timestampr r r r r s\ � � � � � �'� '� '� '� '� '� '� '� �9��.�.�.�L���Q�'�'�'�I�I�Ir r Fc � � |rd S | � d� � | � t � � | � d� � | � d� � d S )Nz=ALTER TABLE icontact_throttle RENAME TO icontact_throttle_oldznINSERT INTO icontact_throttle(message_type,timestamp) SELECT message_type,timestamp FROM icontact_throttle_oldz DROP TABLE icontact_throttle_old)�sql�create_modelr ��migrator�database�fake�kwargss r �migrater sv � �� ����L�L�G�� � � ���*�+�+�+��L�L� C�� � � �L�L�3�4�4�4�4�4r c � � d S )Nr r s r �rollbackr! s � ��Dr N)F)�__doc__�peeweer r r r r r! r r r �<module>r$ s� ��� � 2� 1� 1� 1� 1� 1� 1� 1� 1� 1�(� (� (� (� (�u� (� (� (�5� 5� 5� 5� � � � � � r
Back to File Manager