This commit is contained in:
Your Name
2025-02-26 10:39:00 +01:00
parent 105e439199
commit d0e1ad18e9
10 changed files with 331 additions and 41 deletions

View File

@@ -26,7 +26,8 @@ CREATE TABLE IF NOT EXISTS timestamp_table (
)
""")
cursor.execute("""
INSERT INTO timestamp_table (id, last_updated) VALUES (1, CURRENT_TIMESTAMP);
INSERT OR REPLACE INTO timestamp_table (id, last_updated)
VALUES (1, CURRENT_TIMESTAMP);
""")
@@ -42,6 +43,14 @@ CREATE TABLE IF NOT EXISTS data_NPM (
)
""")
# Create a table CO2
cursor.execute("""
CREATE TABLE IF NOT EXISTS data_CO2 (
timestamp TEXT,
CO2 INTEGER
)
""")
# Create a table BME280
cursor.execute("""
CREATE TABLE IF NOT EXISTS data_BME280 (