H:j>ddlZddlmZddlmZddlmZdZdZdS)N)dbengine) setup_logging)UpdateOrCreateServerIDcBt|dtj}|d t j||j}t||||dS#tj$r-}| t|Yd}~dSd}~wwxYw)N create_db) console_levelzConfiguring connection to db) just_print) rloggingINFOinformake_db_engine print_sql _configure_dbMakeDbExceptionerrorstr) configurationoptslogenginees /builddir/build/BUILDROOT/lve-stats-5.0.4-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/lve_create_db.py configure_dbrs  {', O O OCHH +,,,8(4>RRR mVS$77777  # #a&&sA""B1"BBc^|jr:tj|}|ds|ds|dn|jr-|dtj|||nq|jr*|dtj|n@|dtj|||d |j rtj|d | |j rM|d t| |d dS|j rM|d t||d dSdS)N column_error table_errorzDatabase structure is correctzTry fix errors in database)log_z Recreate DBzCreating tables)cfgDoneT)create_missing_tablesrzUpdating server IDzUpdating server ID with uuid)validatervalidate_databaser fixfix_dbrecreate recreate_dbsetup_dbr update_serverid_promptrpromptupdate_serverid_autoauto)rrrr validations rrrs }/77 >* 6j.G 6 HH4 5 5 5   -... C88888  V$$$$ "###&m4444  !Q&-PPPP " %&&&v&&--///  " /000v&&++--- ) r lvestats.librlvestats.lib.commons.logsetuprlvestats.lib.server_idrrrr-rr2sn!!!!!!777777999999888r-