I've committed some lengthy changes today to switch the internal user and ticket database to PDO. I needed those changes to implement the next features more cleanly so I couldn't wait.
There is a migration script 'dbupgrade.php' and a batch for sqlite 'sqlite.sql' (both in the include directory). Except for a couple of places where I used last_insert_rowid(), I think most of the SQL is portable enough. The layout is mostly identical as before, with the difference that every user has an associated 'role', where the actual permissions are set (this was done keeping in mind groups/roles as discussed before in the ML). dbupgrade.php will simply create the 2 roles admin and user, which are used as before, but customization is now waaay easier.
