(self)
If this is a new db, build it
If this is a new db, build it
If this is a new db build it
def initialize_schema(self):
        """ If this is a new db, build it
        """
        tmp = insert('create table log(module, time, message)')
        if not tmp:
            return

        # it didnt fail, create default schema
        insert('create table host (mac UNIQUE, ip, hostname);')
        insert('create table credentials (username, password, location, '
               'source_idx, time, FOREIGN KEY(source_idx) REFERENCES host(ROWID));')
def initialize_schema ( self ) : tmp = insert ( 'create table log(module, time, message)' ) if not tmp : return # it didnt fail, create default schema insert ( 'create table host (mac UNIQUE, ip, hostname);' ) insert ( 'create table credentials (username, password, location, ' 'source_idx, time, FOREIGN KEY(source_idx) REFERENCES host(ROWID));' )