def add_imap_status_info_rows(folder_id, account_id, db_session):
 if (not db_session.query(ImapFolderSyncStatus).filter_by(account_id=account_id, folder_id=folder_id).all()):
  db_session.add(ImapFolderSyncStatus(account_id=account_id, folder_id=folder_id, state='initial'))
 if (not db_session.query(ImapFolderInfo).filter_by(account_id=account_id, folder_id=folder_id).all()):
  db_session.add(ImapFolderInfo(account_id=account_id, folder_id=folder_id, uidvalidity=1, highestmodseq=22))

def add_imap_status_info_rows ( folder_id , account_id , db_session ) : if ( not db_session . query ( ImapFolderSyncStatus ) . filter_by ( account_id = account_id , folder_id = folder_id ) . all ( ) ) : db_session . add ( ImapFolderSyncStatus ( account_id = account_id , folder_id = folder_id , state = 'initial' ) ) if ( not db_session . query ( ImapFolderInfo ) . filter_by ( account_id = account_id , folder_id = folder_id ) . all ( ) ) : db_session . add ( ImapFolderInfo ( account_id = account_id , folder_id = folder_id , uidvalidity = 1 , highestmodseq = 22 ) )
add placeholder imapfoldersyncstatus and imapfolderinfo rows for this folder_id if none exist .