Changeset 1608

Show
Ignore:
Timestamp:
11/28/06 16:08:57 (2 years ago)
Author:
pacopablo
Message:

SqliteToPgScript:

  • Refs #844 hopefull fix for missing "system" table. Turns out that the ISOLATION_LEVEL_AUTOCOMMIT line was the culprit. I think that I originally had that in there because when I first started the script I was taking a different approach for creating the environments. It's not needed now, and fixes the issue for me. Need testing before I can close the bug.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sqlitetopgscript/0.10/sqlite2pg

    r1304 r1608  
    4747        self.pgdb = self.pgenv.get_db_cnx() 
    4848        self.pgdb_schema = self.pgdb.schema 
    49         self.pgdb.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) 
    5049        pass 
    5150 
     
    210209        cnx = env.get_db_cnx() 
    211210        cur = cnx.cursor() 
    212         cur.execute('select database_version from system'); 
     211        cur.execute("select value from system where name = 'database_version'"); 
    213212    except ProgrammingError: 
    214213        cnx.rollback() 
     
    233232                        WHERE schemaname = %s""" 
    234233    cur.execute(select_tables, (schema,)) 
     234    cnx.commit() 
    235235    return [table[0] for table in cur] 
    236236