Skip to content

Commit

Permalink
remove negate from meter_group and operation from meter_group_relation
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Jan 23, 2024
1 parent 02d9f15 commit cf2ab5d
Show file tree
Hide file tree
Showing 14 changed files with 598 additions and 650 deletions.
2 changes: 1 addition & 1 deletion backend/app/meter.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ exports.put = async (event, context) => {
let response = new Response(event)
let user = new User(event, response)
try {
await Meter(event.body.id).update(event.body.name, event.body.classInt, event.body.negate, user)
await Meter(event.body.id).update(event.body.name, event.body.classInt, user)
} catch (error) {
response.body = error.message
response.status = 400
Expand Down
8 changes: 3 additions & 5 deletions backend/dependencies/nodejs/models/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ class Building {
meter_groups.default as meter_group_default,
meters.name as meter_name,
meters.id as meter_id,
meters.class as meter_class,
meter_group_relation.operation as meter_negate
meters.class as meter_class
FROM buildings
LEFT JOIN meter_groups on buildings.id = meter_groups.building_id_2
LEFT JOIN meter_group_relation on meter_groups.id = meter_group_relation.group_id
Expand Down Expand Up @@ -191,8 +190,7 @@ class Building {

queryJson[row.id].meterGroups[row.meter_group_id].meters[row.meter_id] = {
name: row.meter_name,
classInt: row.meter_class,
negate: row.meter_negate === 0
classInt: row.meter_class
}
}

Expand All @@ -204,7 +202,7 @@ class Building {
for (let meterKey of Object.keys(queryJson[key].meterGroups[groupKey].meters)) {
let meterJson = queryJson[key].meterGroups[groupKey].meters[meterKey]
let meter = new Meter(meterKey)
meter.set(meterJson.name, meterJson.classInt, meterJson.negate)
meter.set(meterJson.name, meterJson.classInt)
meters.push(meter)
}

Expand Down
21 changes: 6 additions & 15 deletions backend/dependencies/nodejs/models/meter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Meter {
this.name = ''
this.address = address
this.classInt = 0
this.negate = 0
this.type = ''
this.points = []
}
Expand All @@ -42,16 +41,13 @@ class Meter {
this.name = row[0]['name']
this.address = row[0]['address']
this.classInt = row[0]['class']
this.negate = row[0]['negate'] === 1

this.calcProps()
return this
}

set(name, classInt, negate) {
set(name, classInt) {
this.name = name
this.classInt = classInt
this.negate = negate
this.calcProps()
}

Expand Down Expand Up @@ -131,7 +127,6 @@ class Meter {
name: this.name,
address: this.address,
classInt: this.classInt,
negate: this.negate,
type: this.type,
points: this.points
}
Expand Down Expand Up @@ -391,30 +386,27 @@ class Meter {
}
}

async update(name, classInt, negate, user) {
async update(name, classInt, user) {
if (user.data.privilege <= 3) {
throw new Error('Need escalated privileges')
}
await DB.connect()
await DB.query('UPDATE meters SET name = ?, class = ?, negate = ? WHERE id = ?', [name, classInt, negate, this.id])
await DB.query('UPDATE meters SET name = ?, class = ? WHERE id = ?', [name, classInt, this.id])
this.name = name
this.classInt = classInt
this.negate = negate
}

static async create(name, address, classInt, negate = 0) {
static async create(name, address, classInt) {
await DB.connect()
let returnRow = await DB.query('INSERT INTO meters (name, address, class, negate) values (?, ?, ?, ?)', [
let returnRow = await DB.query('INSERT INTO meters (name, address, class) values (?, ?, ?)', [
name,
address,
classInt,
negate
classInt
])
let meter = new Meter(returnRow.insertId)
meter.name = name
meter.address = address
meter.class = classInt
meter.negate = negate
return meter
}

Expand All @@ -429,7 +421,6 @@ class Meter {
meter.name = meterQ['name']
meter.address = meterQ['address']
meter.classInt = meterQ['class']
meter.negate = meterQ['negate'] === 1
meter.calcProps()
r.push(meter.data)
}
Expand Down
11 changes: 3 additions & 8 deletions backend/dependencies/nodejs/models/meter_group.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ class MeterGroup {
this.meters = []
for (let meter of meters) {
// this.meters.push((new Meter(meter)).get())
DB.query('INSERT INTO meter_group_relation (meter_id, group_id, operation) VALUES (?, ?, ?)', [
meter.id,
this.id,
meter.operation
])
DB.query('INSERT INTO meter_group_relation (meter_id, group_id) VALUES (?, ?)', [meter.id, this.id])
}
// this.meters = await Promise.all(this.meters)
return this
Expand Down Expand Up @@ -125,10 +121,9 @@ class MeterGroup {
let meterPromises = []
for (let meter of meters) {
meterPromises.push(
DB.query('INSERT INTO meter_group_relation (meter_id, group_id, operation) VALUES (?, ?, ?)', [
DB.query('INSERT INTO meter_group_relation (meter_id, group_id) VALUES (?, ?)', [
meter.id,
insertRow['insertId'],
meter.operation
insertRow['insertId']
])
)
}
Expand Down
154 changes: 77 additions & 77 deletions backend/tests/assertedData/meters_insert.sql
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (1,'Tebeau Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (2,'McNary Complex Master Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (3,'Valley Library Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (4,'Sackett Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (5,'Dixon Electricity','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (6,'McNary Hall Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (7,'Dixon Steam','s',NULL,4444);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (8,'Memorial Union West Electricity (2000A)','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (9,'Memorial Union East Electricity (1000A)','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (10,'Arnold Dining Electrical Main','e',NULL,5);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (11,'Central feeder distribution panel (SDP-1)','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (12,'My New Device','e',NULL,4025);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (13,'Bloss Hall Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (14,'West mechanical room distribution panel (SD-W)','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (15,'Filnley Hall Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (16,'Arnold Dining Chiller Electricity','e',NULL,2);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (17,'My New Device','e',NULL,4025);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (18,'Halsell Hall Electricity','e',NULL,4045);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (19,'Internal I/O','e',NULL,27);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (20,'4M-1A','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (21,'X-3','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (22,'4L-1A','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (23,'4M-PHA','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (24,'ATS-LS','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (25,'SPARE 100A','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (26,'SPARE 225A','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (27,'Internal I/O','e',NULL,27);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (28,'ILLC Electricity','e',NULL,82);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (29,'Student Experience Center Steam','s',NULL,4444);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (30,'Student Experience Center Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (31,'Nash 1500 Amp Electrical','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (32,'Nash 3000 Amp Electrical','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (33,'4000A service','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (34,'2000A Service','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (35,'Weniger South Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (36,'Milne South Electrical','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (37,'Milne North Electrical','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (38,'Buxton Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (39,'Hawley Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (40,'Dryden Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (41,'Callahan Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (42,'Wilson Electricity','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (43,'Poling Electricity','e',NULL,4045);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (44,'West Hall Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (45,'Cauthorn Hall Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (46,'West Dining','e',NULL,2);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (47,'Gill','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (48,'Internal I/O','e',NULL,27);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (49,'Milam Electricity','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (50,'CH2MHill Alumni Center Electricity Old','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (51,'CH2MHill Alumni Center Electricity New','e',NULL,2);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (52,'CH2MHill Alumni Center Modhopper','g',NULL,17);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (53,'Buxton Electricity','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (54,NULL,NULL,NULL,NULL);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (55,'Main Johnson Hall','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (56,'X-7','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (57,'X-9','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (58,'S4P-PHA','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (59,'X-10','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (60,'S4P-1A','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (61,'SPARE 200A','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (62,'Wave Tank # 1','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (63,'Wave Tank # 2','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (64,'Wave Tank # 3','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (65,'Wave Tank # 4','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (66,'Wave Tank HVAC','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (67,'Building Main','e',NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (68,'Orchard Court',NULL,NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (69,'West Side Wave Tank',NULL,1,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (70,'Main Pump Disconnect',NULL,NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (71,'Wave Machine',NULL,NULL,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (72,'Kelley Steam','s',NULL,4444);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (73,'Nash Steam','s',NULL,4444);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (75,'Test Meter',NULL,0,2);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (76,'Test Meter',NULL,0,2);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (77,'Valley Library Electric',NULL,0,48);
INSERT INTO `` (`id`,`name`,`type`,`negate`,`class`) VALUES (78,'Red Lion',NULL,0,4444);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (1,'Tebeau Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (2,'McNary Complex Master Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (3,'Valley Library Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (4,'Sackett Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (5,'Dixon Electricity','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (6,'McNary Hall Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (7,'Dixon Steam','s',4444);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (8,'Memorial Union West Electricity (2000A)','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (9,'Memorial Union East Electricity (1000A)','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (10,'Arnold Dining Electrical Main','e',5);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (11,'Central feeder distribution panel (SDP-1)','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (12,'My New Device','e',4025);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (13,'Bloss Hall Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (14,'West mechanical room distribution panel (SD-W)','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (15,'Filnley Hall Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (16,'Arnold Dining Chiller Electricity','e',2);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (17,'My New Device','e',4025);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (18,'Halsell Hall Electricity','e',4045);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (19,'Internal I/O','e',27);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (20,'4M-1A','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (21,'X-3','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (22,'4L-1A','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (23,'4M-PHA','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (24,'ATS-LS','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (25,'SPARE 100A','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (26,'SPARE 225A','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (27,'Internal I/O','e',27);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (28,'ILLC Electricity','e',82);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (29,'Student Experience Center Steam','s',4444);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (30,'Student Experience Center Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (31,'Nash 1500 Amp Electrical','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (32,'Nash 3000 Amp Electrical','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (33,'4000A service','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (34,'2000A Service','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (35,'Weniger South Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (36,'Milne South Electrical','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (37,'Milne North Electrical','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (38,'Buxton Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (39,'Hawley Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (40,'Dryden Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (41,'Callahan Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (42,'Wilson Electricity','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (43,'Poling Electricity','e',4045);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (44,'West Hall Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (45,'Cauthorn Hall Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (46,'West Dining','e',2);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (47,'Gill','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (48,'Internal I/O','e',27);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (49,'Milam Electricity','e',1,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (50,'CH2MHill Alumni Center Electricity Old','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (51,'CH2MHill Alumni Center Electricity New','e',2);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (52,'CH2MHill Alumni Center Modhopper','g',17);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (53,'Buxton Electricity','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (54,NULL);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (55,'Main Johnson Hall','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (56,'X-7','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (57,'X-9','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (58,'S4P-PHA','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (59,'X-10','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (60,'S4P-1A','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (61,'SPARE 200A','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (62,'Wave Tank # 1','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (63,'Wave Tank # 2','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (64,'Wave Tank # 3','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (65,'Wave Tank # 4','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (66,'Wave Tank HVAC','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (67,'Building Main','e',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (68,'Orchard Court',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (69,'West Side Wave Tank',1,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (70,'Main Pump Disconnect',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (71,'Wave Machine',48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (72,'Kelley Steam','s',4444);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (73,'Nash Steam','s',4444);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (75,'Test Meter',0,2);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (76,'Test Meter',0,2);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (77,'Valley Library Electric',0,48);
INSERT INTO `` (`id`,`name`,`type`,`class`) VALUES (78,'Red Lion',0,4444);
2 changes: 0 additions & 2 deletions backend/tests/buildTestDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ DB.beginTransaction(err => {
\`id\` INTEGER NOT NULL AUTO_INCREMENT,
\`meter_id\` INTEGER,
\`group_id\` INTEGER,
\`operation\` INTEGER,
PRIMARY KEY (\`id\`)
);`

Expand All @@ -87,7 +86,6 @@ DB.beginTransaction(err => {
\`name\` TEXT,
\`address\` char(16) DEFAULT NULL,
\`type\` TEXT,
\`negate\` INTEGER,
\`class\` INTEGER,
PRIMARY KEY (\`id\`)
);`
Expand Down
Loading

0 comments on commit cf2ab5d

Please sign in to comment.