Skip to content

Commit

Permalink
Merge pull request #3143 from newjersey/njwe-2545/etpl-2024-12-31
Browse files Browse the repository at this point in the history
etpl data 2024-12-31
  • Loading branch information
ChelseaKR authored Dec 31, 2024
2 parents 2560483 + 1fc6e72 commit 84528f5
Show file tree
Hide file tree
Showing 6 changed files with 449,715 additions and 3,984 deletions.
7,783 changes: 3,799 additions & 3,984 deletions backend/data/standardized_etpl.csv

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions backend/migrations/20241231220701-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"
? "20241231220701-update-etpl-up-TEST.sql"
: "20241231220701-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"
? "20241231220701-update-etpl-down-TEST.sql"
: "20241231220701-update-etpl-down.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,019 changes: 223,019 additions & 0 deletions backend/migrations/sqls/20241231220701-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 84528f5

Please sign in to comment.