Updates database properly

Resets database correctly to preserve numbers