code: def _db_upgrade(self, db_name):
          
          current_db_version = self._get_db_version()
          self._execute(db_schema.functions)
          for i in range(current_db_version, nipap.__db_version__):
              self._logger.info("Upgrading DB schema:", i, "to", i+1)
              upgrade_sql = db_schema.upgrade[i-1] # 0 count on array
              self._execute(upgrade_sql % (db_name))
          self._execute(db_schema.triggers)
docs: Upgrade nipap database schema