* fix forgot removed records when deleting user * fix migration * fix rewritekey lock on sqlite * remove unused codes