seadsystem / Backend

Other
4 stars 5 forks source link

Puppet script needs to be updated #10

Closed aadabi closed 9 years ago

aadabi commented 9 years ago

Puppet needs to integrate table formation for both sead plug and egauge.

iangudger commented 9 years ago

This is two separate issues. Please file separately.

eGauge and sead plug data are stored in the same table. The puppet script has already been modified to create a raw data table capable of storing both kinds of data: https://github.com/seadsystem/Backend/blob/master/DB/puppet/modules/deploy/manifests/init.pp

aadabi commented 9 years ago

Yes, I notice therefor closing this,... they are inserted into the same table data_raw. CREATE TABLE data_raw (
serial BIGINT NOT NULL,
type CHAR(1) NOT NULL,
device TEXT NULL,
data BIGINT NOT NULL,
time TIMESTAMP NOT NULL );

I made a local DB on my computer with the exact same schema and had problem inserting stuff into it. It was saying this is not an int....>"2015-05-0800:00:01" probably the ordering should be different... not a biggie. Where did the DB insertion happened in the code?

aadabi commented 9 years ago

The issue is closed since data_raw is shared between sead plug and egauge.

iangudger commented 9 years ago

Here is the DDL for the schema currently on db.sead.systems as reported as Postgres: CREATE TABLE data_raw ( serial BIGINT NOT NULL, type CHAR(1) NOT NULL, data INT NOT NULL, time TIMESTAMP NOT NULL, device VARCHAR );