mbannert / timeseriesdb

{timeseriesdb} Manage Time Series with R and PostgreSQL
GNU General Public License v3.0
23 stars 3 forks source link

Error following the installation guide #258

Open majazaloznik opened 2 years ago

majazaloznik commented 2 years ago

Following the installation guide (and including the grant access in pull request #257), I'm getting the following error to the line db_ts_store(con, tsl).

Error in store_records(con, to_ts_json(x), access, "timeseries_main",  : 
No access level supplied and no default configured on the database.
majazaloznik commented 2 years ago

Aha, this seems to be because the timeseries.access_levels table is not populated during installation, but if I run the lines from the dev environment setup, it works:

INSERT INTO timeseries.access_levels VALUES ('timeseries_access_public', 'Publicly available time series');
INSERT INTO timeseries.access_levels VALUES ('timeseries_access_main', 'Non-public time series without license restrictions', true);
INSERT INTO timeseries.access_levels VALUES ('timeseries_access_restricted', 'License restricted time series');

So presumably these three lines need to be called somewhere in install_timeseriesdb() for the installation setup to work.