Skip to content

Commit

Permalink
Merge pull request #3131 from newjersey/njwe-2520/etpl-data-2024-12-20
Browse files Browse the repository at this point in the history
etpl data 2024-12-20
ChelseaKR authored Dec 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents e47179f + 73bac7d commit 81eb0af
Showing 6 changed files with 498,184 additions and 31,257 deletions.
72,871 changes: 41,614 additions & 31,257 deletions backend/data/standardized_etpl.csv

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions backend/migrations/20241220213147-update-etpl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
'use strict';

var dbm;
var type;
var seed;
var fs = require('fs');
var path = require('path');
var Promise;

/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
exports.setup = function(options, seedLink) {
dbm = options.dbmigrate;
type = dbm.dataType;
seed = seedLink;
Promise = options.Promise;
};

exports.up = function(db) {
const fileName =
process.env.NODE_ENV === "test"
? "20241220213147-update-etpl-up-TEST.sql"
: "20241220213147-update-etpl-up.sql";
var filePath = path.join(__dirname, 'sqls', fileName);
return new Promise( function( resolve, reject ) {
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
if (err) return reject(err);
console.log('received data: ' + data);

resolve(data);
});
})
.then(function(data) {
return db.runSql(data);
});
};

exports.down = function(db) {
const fileName =
process.env.NODE_ENV === "test"
? "20241220213147-update-etpl-up-TEST.sql"
: "20241220213147-update-etpl-up.sql";
var filePath = path.join(__dirname, 'sqls', fileName);
return new Promise( function( resolve, reject ) {
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
if (err) return reject(err);
console.log('received data: ' + data);

resolve(data);
});
})
.then(function(data) {
return db.runSql(data);
});
};

exports._meta = {
"version": 1
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- intentionally left blank
223,075 changes: 223,075 additions & 0 deletions backend/migrations/sqls/20241220213147-update-etpl-down.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- intentionally left blank
Loading

0 comments on commit 81eb0af

Please sign in to comment.