before reset db