added sql script for id-handlers
working on retrieving/recycling ids