def setVersionList(self, v):
        self.dbCheck()
        with self.env.db_transaction as db:
            db("DELETE FROM version")
            for value in v:
                # time and description are also available
                db("INSERT INTO version (name) VALUES (%s)", value)
Save override to omit empty fields
dataset/ETHPy150Open edgewall/trac/contrib/sourceforge2trac.py/TracDatabase.setVersionList--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/projects/forms.py/MassActionForm.save