Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't use "insert ... default values" in sqlite3.

It isn't supported in older sqlite3 versions.  Let's just do something
equivalent instead.
  • Loading branch information...
commit 4e285607f010d6fabde2d7e8e30d35b0604af21a 1 parent b993e44
@apenwarr authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 state.py
View
6 state.py
@@ -72,11 +72,13 @@ def db():
" primary key (target,source))")
_db.execute("insert into Schema (version) values (?)", [SCHEMA_VER])
# eat the '0' runid and File id
- _db.execute("insert into Runid default values")
+ _db.execute("insert into Runid values "
+ " ((select max(id)+1 from Runid))")
_db.execute("insert into Files (name) values (?)", [ALWAYS])
if not vars.RUNID:
- _db.execute("insert into Runid default values")
+ _db.execute("insert into Runid values "
+ " ((select max(id)+1 from Runid))")
vars.RUNID = _db.execute("select last_insert_rowid()").fetchone()[0]
os.environ['REDO_RUNID'] = str(vars.RUNID)
Please sign in to comment.
Something went wrong with that request. Please try again.