Reorder operations at db downgrade