o k`@spddlZddlmZddlmZmZddlmZddlm Z ddl m Z ddl m Z dZd d Zd Zd d ZdS)N)DatabaseManager)ColumnTable)ResourceNotFound)Report)printout)_zEhttps://trac.edgewall.org/wiki/1.3/TracUpgrade#enum-description-fieldc Cstdddtdtdtdtdfg}|j=t||g}dD])}zt||}Wn ty6Yq$wt|j}|rF||_| q$| t |q$Wd n1sXwY|rod |}t td |td d Sd S) z)Add `description` column to `enum` table.enum)typename)keyr r value description)Nz, zReport(s) %(ids)s could not be upgraded and may need to be manually edited to avoid an "ambiguous column name" error. See %(url)s for more information. )idsurl)rrdb_transactionrupgrade_tablesrrreplace_sql_fragmentqueryupdateappendstrjoinrrr)envversioncursor new_schemafailuresid_rrr'4/usr/lib/python3/dist-packages/trac/upgrades/db44.py do_upgrades<       r)z.(?s     %