plexosdb 1.4.0__tar.gz → 1.4.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: plexosdb
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: SQLite API for plexos XMLs
5
5
  Keywords: PLEXOS,Database,SQLite
6
6
  Author: Pedro Andres Sanchez Perez, Kodi Obika, mcllerena
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plexosdb"
3
- version = "1.4.0"
3
+ version = "1.4.1"
4
4
  readme = "README.md"
5
5
  license = {file = "LICENSE.txt"}
6
6
  keywords = ["PLEXOS", "Database", "SQLite"]
@@ -1530,6 +1530,22 @@ class PlexosDB:
1530
1530
  JOIN temp_data_mapping tdm ON b.data_id = tdm.old_id
1531
1531
  """)
1532
1532
 
1533
+ # Copy date_from
1534
+ self._db.execute("""
1535
+ INSERT INTO t_date_from (data_id, date, state)
1536
+ SELECT tdm.new_id, df.date, df.state
1537
+ FROM t_date_from df
1538
+ JOIN temp_data_mapping tdm ON df.data_id = tdm.old_id
1539
+ """)
1540
+
1541
+ # Copy date_to
1542
+ self._db.execute("""
1543
+ INSERT INTO t_date_to (data_id, date, state)
1544
+ SELECT tdm.new_id, dt.date, dt.state
1545
+ FROM t_date_to dt
1546
+ JOIN temp_data_mapping tdm ON dt.data_id = tdm.old_id
1547
+ """)
1548
+
1533
1549
  self._db.execute("DROP TABLE IF EXISTS temp_mapping")
1534
1550
  self._db.execute("DROP TABLE IF EXISTS temp_data_mapping")
1535
1551
  return True
File without changes
File without changes
File without changes
File without changes
File without changes