
    Vh                     B    d dl mZ d dlmZ d dlmZmZ  G d de      Zy)    )BaseCommand)	sql_flush)DEFAULT_DB_ALIASconnectionsc                   ,     e Zd ZdZdZ fdZd Z xZS )CommandzReturns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed.Tc                 p    t         |   |       |j                  dt        t	        t
              d       y )Nz
--databasezNNominates a database to print the SQL for. Defaults to the "default" database.)defaultchoiceshelp)superadd_argumentsadd_argumentr   tupler   )selfparser	__class__s     X/home/dcms/DCMS/lib/python3.12/site-packages/django/core/management/commands/sqlflush.pyr   zCommand.add_arguments   s6    f%$+& 	 	
    c                     t        | j                  t        |d            }|s#|d   dk\  r| j                  j	                  d       dj                  |      S )Ndatabase	verbosity   zNo tables found.
)r   styler   stderrwritejoin)r   optionssql_statementss      r   handlezCommand.handle   sM    "4::{7:;N/OP'+"6!";KK01yy((r   )__name__
__module____qualname__r   output_transactionr   r!   __classcell__)r   s   @r   r   r      s     	Q 	
 

)r   r   N)django.core.management.baser   django.core.management.sqlr   	django.dbr   r   r    r   r   <module>r+      s    3 0 3)k )r   