adapt to run in mixed databases (prod and dev)