create service table

This commit is contained in:
tncyclk 2017-10-31 10:16:06 +03:00
parent b37429b585
commit ca6ccd2eb6

View file

@ -54,6 +54,8 @@ class AhenkDbService(object):
self.check_and_create_table('mail', ['id INTEGER PRIMARY KEY AUTOINCREMENT', 'command TEXT', 'mailstatus INTEGER', 'timestamp TEXT']) self.check_and_create_table('mail', ['id INTEGER PRIMARY KEY AUTOINCREMENT', 'command TEXT', 'mailstatus INTEGER', 'timestamp TEXT'])
self.check_and_create_table('service', ['id INTEGER PRIMARY KEY AUTOINCREMENT', 'serviceName TEXT', 'serviceStatus TEXT','timestamp TEXT','task_id INTEGER'])
def get_cols(self, table_name): def get_cols(self, table_name):
if table_name == 'agreement': if table_name == 'agreement':
@ -191,4 +193,4 @@ class AhenkDbService(object):
self.cursor.close() self.cursor.close()
self.connection.close() self.connection.close()
except Exception as e: except Exception as e:
self.logger.error('Closing database connection error: {0}'.format(str(e))) self.logger.error('Closing database connection error: {0}'.format(str(e)))