Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On a newly installed system database namings and columns are missing #181

Open
maglub opened this issue Jul 25, 2016 · 1 comment
Open
Assignees

Comments

@maglub
Copy link
Owner

maglub commented Jul 25, 2016

pi@reto-r001wue:~/piLogger/bin $ ./refreshCaches 
20160725_134912;refreshCaches;  - Refreshing caches 
20160725_134912;refreshCaches;  - Refreshing sensorData.json
20160725_134912;exportJSON;* Starting export of JSON for default 
Error: near line 1: no such column: sensor.multiplier
ERROR: opening '/var/lib/piLogger/db/.28.2F0143050000.rrd': No such file or directory
20160725_134912;refreshCaches;  - Refreshing caches 168h
20160725_134912;refreshCaches;  - Refreshing caches 12h
20160725_134912;refreshCaches;  - Refreshing caches 24h
20160725_134912;refreshCaches;  - Refreshing sensorData.default.12h.cache
20160725_134912;refreshCaches;  - Refreshing sensorData.default.168h.cache
20160725_134912;refreshCaches;  - Refreshing sensorData.default.24h.cache
20160725_134913;exportJSON;* Starting export of JSON for default 12h
20160725_134913;exportJSON;* Starting export of JSON for default 168h
20160725_134913;exportJSON;* Starting export of JSON for default 24h
Error: near line 1: no such column: sensor.multiplier
Error: near line 1: no such column: sensor.multiplier
Error: near line 1: no such column: sensor.multiplier
ERROR: opening '/var/lib/piLogger/db/.28.2F0143050000.rrd': No such file or directory
ERROR: opening '/var/lib/piLogger/db/.28.2F0143050000.rrd': No such file or directory
ERROR: opening '/var/lib/piLogger/db/.28.2F0143050000.rrd': No such file or directory
20160725_134913;refreshCaches;  - Refreshing caches sensors
20160725_134913;refreshCaches;  - Refreshing sensorAllInfo.json
20160725_134913;listDevices;Found devices in the database.
@maglub maglub self-assigned this Jul 25, 2016
@maglub
Copy link
Owner Author

maglub commented Jul 25, 2016

Quick workaround:

sqlite3 /var/lib/piLogger/db/app.sqlite3<<EOT
alter table sensor add column multiplier float;
update sensor set multiplier=1;
alter table plotgroup add column metric text ;
update plotgroup set metric = 'temperature' where metric is null ;
EOT

This has earlier been added to the upgrade.sh script, but not been properly dealt with in dbSetup.sh and the db/ddl.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant