Skip to content

Commit

Permalink
improvement/cleanup: uke/pit: all selected node types are greater tha…
Browse files Browse the repository at this point in the history
…n 0 value
  • Loading branch information
chilek committed Feb 10, 2023
1 parent deb38f2 commit 980a30d
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/lms.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -4291,4 +4291,4 @@ INSERT INTO netdevicemodels (name, alternative_name, netdeviceproducerid) VALUES
('XR7', 'XR7 MINI PCI PCBA', 2),
('XR9', 'MINI PCI 600MW 900MHZ', 2);

INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2023020900');
INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2023021000');
2 changes: 1 addition & 1 deletion doc/lms.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -4341,6 +4341,6 @@ INSERT INTO netdevicemodels (name, alternative_name, netdeviceproducerid) VALUES
('XR7', 'XR7 MINI PCI PCBA', 2),
('XR9', 'MINI PCI 600MW 900MHZ', 2);

INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2023020900');
INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2023021000');

COMMIT;
2 changes: 1 addition & 1 deletion lib/LMSDB_common.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

// here should be always the newest version of database!
define('DBVERSION', '2023020900');
define('DBVERSION', '2023021000');

/**
*
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@
);

$NETELEMENTTYPES = array(
0 => trans('<!netelemtype>office building'),
21 => trans('<!netelemtype>office building'),
2 => trans('<!netelemtype>residential building'),
1 => trans('<!netelemtype>industrial building'),
11 => trans('<!netelemtype>service building'),
Expand Down
30 changes: 30 additions & 0 deletions lib/upgradedb/mysql.2023021000.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/*
* LMS version 1.11-git
*
* (C) Copyright 2001-2023 LMS Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
*/

$this->BeginTrans();

$this->Execute("UPDATE netnodes SET type = ? WHERE type = ?", array(21, 0));

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2023021000', 'dbversion'));

$this->CommitTrans();
30 changes: 30 additions & 0 deletions lib/upgradedb/postgres.2023021000.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/*
* LMS version 1.11-git
*
* (C) Copyright 2001-2023 LMS Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
*/

$this->BeginTrans();

$this->Execute("UPDATE netnodes SET type = ? WHERE type = ?", array(21, 0));

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2023021000', 'dbversion'));

$this->CommitTrans();

0 comments on commit 980a30d

Please sign in to comment.