|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/django/core/management/commands/ |
Upload File : |
�
r�\c @ s� d d l Z d d l m Z d d l m Z d d l m Z m Z m Z m Z m
Z
d d l m Z d d l
m Z m Z d d l m Z d d l m Z m Z d d l m Z d d
l m Z d d l m Z d e f d
� � YZ d S( i����N( t make_option( t settings( t connectionst routert transactiont modelst DEFAULT_DB_ALIAS( t call_command( t
NoArgsCommandt CommandError( t no_style( t sql_flusht emit_post_sync_signal( t
import_module( t input( t sixt Commandc
B s� e Z e j e d d d d d d e d d �e d d d d d
d e d d �e d d d d d
d e d d �f Z d Z d � Z e d � � Z
RS( s --noinputt actiont store_falset destt interactivet defaultt helps: Tells Django to NOT prompt the user for input of any kind.s
--databaset storet databasesB Nominates a database to flush. Defaults to the "default" database.s --no-initial-datat load_initial_datasI Tells Django not to load any initial data after database synchronization.s� Returns the database to the state it was in immediately after syncdb was executed. This means that all data will be removed from the database, any post-synchronization handlers will be re-executed, and the initial_data fixture will be re-installed.c K s | j d � } t | } t | j d � � } | j d � } | j d t � } | j d t � } | j d t � } t � | _ x6 t j D]+ } y t d | � Wq� t
k
r� q� Xq� Wt | j | d t d | d | �}
| r� t d | j
d
� } n d } | d k r�yS t j d | d
| j j � �/ | j � } x |
D] }
| j |
� qCWWd QXWnM t k
r�} d | j
d
| f } t j t t | � t j � d � n X| s�| j | | | � n | j d � rt d d | � qn | j j d � d S( NR t verbosityR t reset_sequencest
allow_cascadet inhibit_post_syncdbs .managementt only_djangos� You have requested a flush of the database.
This will IRREVERSIBLY DESTROY all data currently in the %r database,
and return each table to the state it was in after syncdb.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: t NAMEt yest usingt savepointsD Database %s couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
The full error: %si R t loaddatat initial_datas Flush cancelled.
( t getR t intt Truet FalseR
t styleR t INSTALLED_APPSR
t ImportErrorR R t
settings_dictR t atomict featurest can_rollback_ddlt cursort executet ExceptionR t reraiseR t syst exc_infot emit_post_syncdbR t stdoutt write( t selft optionsR t
connectionR R R R R t app_namet sql_listt confirmR0 t sqlt et new_msg( ( sG /tmp/pip-install-XxeQeY/django/django/core/management/commands/flush.pyt
handle_noargs sH
'c C s{ g } xU t j � D]G } | j g t j | d t �D] } t j | | � r5 | ^ q5 � q Wt t | � | | | � d S( Nt include_auto_created( R t get_appst extendt
get_modelsR'