Would it be more shareable to apply the fix inside create_and_switch_db() function rather the parameter of one use case.