persist lights in db