Files
sunscope/db/002_add_reading.sql
T
fraxle 71860b9dd9 5.4.0
Restructure
New Journal entries
Colour tabs update with wind
2026-08-31 15:12:45 +01:00

15 lines
760 B
SQL

-- Adds an optional computed reading to a journal entry, captured the same
-- way the day tabs derive their headline number: peak value of the active
-- profile's main field across that day's hourly forecast rows. Only
-- possible for dates inside the 14-day forecast window, so it's nullable -
-- older/out-of-range entries stay note-only.
ALTER TABLE journal_entries
ADD COLUMN profile VARCHAR(32) NULL AFTER note,
ADD COLUMN reading DECIMAL(5,1) NULL AFTER profile,
ADD COLUMN location_name VARCHAR(255) NULL AFTER reading,
ADD COLUMN lat DECIMAL(8,5) NULL AFTER location_name,
ADD COLUMN lon DECIMAL(8,5) NULL AFTER lat;
INSERT IGNORE INTO schema_migrations (version) VALUES ('002_add_reading');