DO $$
DECLARE
 version_new_ CONSTANT integer := 26;-- new version number --
 ver_ integer;
BEGIN
  LOCK TABLE variables;
  SELECT version_is('Ls') INTO ver_;
  IF ver_ < version_new_ THEN
    -- begin update --

--- Alsa --- (22, 2)
INSERT INTO object_settings_type(_otype, key, name, descr, type, min_value, max_value)
  VALUES (2, 'MsiSetupOverride', 'MSI override', 'MSI override bytes', 'text', '', '');
INSERT INTO object_settings(_object, key, value) 
  (SELECT o._id, 'MsiSetupOverride', '' 
    FROM object_settings s 
    JOIN object o ON s._object = o._id
   WHERE o._otype = 2 AND s.Key = 'Source' AND s.Value = '1'
  );

    -- end update --
    PERFORM version_set('Ls', version_new_);
  END IF;
END$$;