alsmanager_lib 1.0.97 → 1.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -732,25 +732,6 @@ CREATE TABLE IF NOT EXISTS "ImportChromeDev20250121" (
732
732
  "eids" TEXT,
733
733
  "iccids" TEXT
734
734
  );
735
- CREATE TABLE IF NOT EXISTS "device_pc" (
736
- "id_device" INTEGER,
737
- "pc_name" TEXT,
738
- "wifi" INTEGER,
739
- "ethernet" INTEGER,
740
- "OS" TEXT,
741
- "OS_version" TEXT,
742
- "OS_arch" TEXT,
743
- "CPU" TEXT,
744
- "CPU_arch" TEXT,
745
- "RAM_GB" INTEGER,
746
- "video_card" INTEGER,
747
- "smartboard_ready" INTEGER,
748
- "note" TEXT,
749
- "da_properties" INTEGER,
750
- "benchmark" TEXT,
751
- "note_prot" TEXT,
752
- PRIMARY KEY("id_device")
753
- );
754
735
  CREATE TABLE IF NOT EXISTS "ImportReteDida2" (
755
736
  "Stato" TEXT,
756
737
  "Nome" TEXT,
@@ -976,22 +957,43 @@ CREATE TABLE IF NOT EXISTS "device_memory" (
976
957
  "mem_size_unit" TEXT,
977
958
  PRIMARY KEY("id")
978
959
  );
960
+ CREATE TABLE IF NOT EXISTS "disk_usage" (
961
+ "id" INTEGER,
962
+ "date_ref" TEXT,
963
+ "id_device" INTEGER,
964
+ "id_storage" INTEGER,
965
+ "size_unit" TEXT,
966
+ "available_space" REAL,
967
+ PRIMARY KEY("id" AUTOINCREMENT)
968
+ );
979
969
  CREATE TABLE IF NOT EXISTS "change_config" (
980
970
  "id" INTEGER,
981
971
  "id_conf" INTEGER,
972
+ "id_device" INTEGER,
982
973
  "part_type" TEXT,
983
974
  "id_part" INTEGER,
984
975
  "operation" TEXT,
985
976
  "id_part_replaced" INTEGER,
986
977
  PRIMARY KEY("id" AUTOINCREMENT)
987
978
  );
988
- CREATE TABLE IF NOT EXISTS "disk_usage" (
979
+ CREATE TABLE IF NOT EXISTS "device_pc" (
989
980
  "id" INTEGER,
990
- "date_ref" TEXT,
991
981
  "id_device" INTEGER,
992
- "id_storage" INTEGER,
993
- "size_unit" TEXT,
994
- "available_space" REAL,
982
+ "pc_name" TEXT,
983
+ "wifi" INTEGER,
984
+ "ethernet" INTEGER,
985
+ "OS" TEXT,
986
+ "OS_version" TEXT,
987
+ "OS_arch" TEXT,
988
+ "CPU" TEXT,
989
+ "CPU_arch" TEXT,
990
+ "RAM_GB" INTEGER,
991
+ "video_card" INTEGER,
992
+ "smartboard_ready" INTEGER,
993
+ "note" TEXT,
994
+ "da_properties" INTEGER,
995
+ "benchmark" TEXT,
996
+ "note_prot" TEXT,
995
997
  PRIMARY KEY("id" AUTOINCREMENT)
996
998
  );
997
999
  COMMIT;
package/lib/modules.js CHANGED
@@ -1748,7 +1748,7 @@ function getLastPCPropertiesInsertedSQLite(id_device) {
1748
1748
  query += "from device_pc dp ";
1749
1749
  query += "left join devices d on dp.id_device = d.id ";
1750
1750
  query += "where dp.id_device = " + id_device + " ";
1751
- query += "order by id desc LIMIT 1";
1751
+ query += "order by dp.id desc LIMIT 1";
1752
1752
  return query;
1753
1753
  }
1754
1754
  function getLastPCPropertiesInsertedMySQL(id_device) {
@@ -1759,7 +1759,7 @@ function getLastPCPropertiesInsertedMySQL(id_device) {
1759
1759
  query += "from device_pc dp ";
1760
1760
  query += "left join devices d on dp.id_device = d.id ";
1761
1761
  query += "where dp.id_device = :id_device ";
1762
- query += "order by id desc LIMIT 1";
1762
+ query += "order by dp.id desc LIMIT 1";
1763
1763
  return query;
1764
1764
  }
1765
1765
  function getLastPCPropertiesInserted(db_used, id_device) {
@@ -5631,7 +5631,8 @@ function insertConsegnaDeviceSQLite(id_consegna, id_device, note){
5631
5631
  var query = "insert into device_consegne (id_consegna, id_device, note) values ";
5632
5632
  query += "(" + id_consegna + ", ";
5633
5633
  query += id_device + ", ";
5634
- query += "'" + note + "' ";
5634
+ query += "'" + note + "'";
5635
+ query += ")";
5635
5636
  return query;
5636
5637
  }
5637
5638
 
@@ -5640,6 +5641,7 @@ function insertConsegnaDeviceMySQL(id_consegna, id_device, note){
5640
5641
  query += "(:id_consegna, ";
5641
5642
  query += ":id_device, ";
5642
5643
  query += ":note ";
5644
+ query += ")";
5643
5645
  return query;
5644
5646
  }
5645
5647
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alsmanager_lib",
3
- "version": "1.0.97",
3
+ "version": "1.0.99",
4
4
  "description": "Funzioni per ALSManager",
5
5
  "license": "ISC",
6
6
  "author": "Luca Cattani",