GNU bug report logs -
#32121
Cuirass: add support for multiple inputs
Previous Next
Full log
View this message in rfc822 format
Clément Lassieur <clement <at> lassieur.org> writes:
> +(define (db-get-version db)
> + (if (pair? (sqlite-exec db "SELECT name FROM sqlite_master WHERE \
> +type='table' AND name='SchemaVersion';"))
> + (vector-ref
> + (car (sqlite-exec db "SELECT MAX(version) FROM SchemaVersion;")) 0)
> + 0))
> +
> +(define (db-set-version db version)
> + (sqlite-exec db "INSERT INTO SchemaVersion (version) VALUES (" version
> + ");"))
Actually, there is:
--8<---------------cut here---------------start------------->8---
PRAGMA schema.user_version;
PRAGMA schema.user_version = integer ;
The user_version pragma will to get or set the value of the user-version
integer at offset 60 in the database header. The user-version is an
integer that is available to applications to use however they
want. SQLite makes no use of the user-version itself.
--8<---------------cut here---------------end--------------->8---
Better use them than creating an ad-hoc table I guess, WDYT?
This bug report was last modified 7 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.