Make sure schema upgrade can re-create tables; some cleanup