@@ -2120,6 +2120,7 @@ def new_project(self):
21202120 v9 has project.recently_used_codes text') # code ids list split by a space
21212121 v10 has code_image.pdf_page integer added
21222122 v11 has gr_pix_item.pdf_page integer added
2123+ v12 has manage_files_display table added. For Table display profile.
21232124 """
21242125
21252126 self .journal_display = None
@@ -2230,8 +2231,9 @@ def new_project(self):
22302231 cur .execute ("CREATE TABLE gr_av_item (gr_avid integer primary key, grid integer, avid integer,"
22312232 "x integer, y integer, pos0 integer, pos1 integer, filepath text, tooltip text, color text);" )
22322233 cur .execute ("CREATE TABLE ris (risid integer, tag text, longtag text, value text);" )
2234+ cur .execute ("CREATE TABLE manage_files_display (mfid integer primary key, name text, tblrows text, tblcolumns text, owner text);" )
22332235 cur .execute ("INSERT INTO project VALUES(?,?,?,?,?,?,?,?)" ,
2234- ('v11 ' , datetime .datetime .now ().astimezone ().strftime ("%Y-%m-%d %H:%M:%S" ), '' , qualcoder_version , 0 ,
2236+ ('v12 ' , datetime .datetime .now ().astimezone ().strftime ("%Y-%m-%d %H:%M:%S" ), '' , qualcoder_version , 0 ,
22352237 0 , self .app .settings ['codername' ], "" ))
22362238 self .app .conn .commit ()
22372239 try :
@@ -2739,6 +2741,15 @@ def open_project(self, path_="", newproject="no"):
27392741 self .project_summary_report ()
27402742 self .show_menu_options ()
27412743
2744+ # Database version v12
2745+ try :
2746+ cur .execute ("select name from manage_files_display" )
2747+ except sqlite3 .OperationalError :
2748+ cur .execute ("CREATE TABLE manage_files_display (mfid integer primary key, name text, tblrows text, tblcolumns text, owner text);" )
2749+ cur .execute ('update project set databaseversion="v12", about=?' , [qualcoder_version ])
2750+ self .app .conn .commit ()
2751+ self .ui .textEdit .append (_ ("Updating database to version" ) + " v12" )
2752+
27422753 # Delete codings (fid, id) that do not have a matching source id
27432754 sql = "select fid from code_text where fid not in (select source.id from source)"
27442755 cur .execute (sql )
0 commit comments