Make pristine still works if the database doesn't exist
fixing bug that dropped last 1000 lines