Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangoulding committed Nov 7, 2024
1 parent 756f99b commit 6f3a448
Showing 1 changed file with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
'use strict';
'use strict'

const fs = require('fs');
const path = require('path');
let Promise;
const fs = require('fs')
const path = require('path')
let 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) {
Promise = options.Promise;
};
exports.setup = function (options, _seedLink) {
Promise = options.Promise
}

exports.up = function(db) {
var filePath = path.join(__dirname, 'sqls', '20241107093135-add-quarterly-returns-to-return-versions-up.sql');
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);
exports.up = function (db) {
const filePath = path.join(__dirname, 'sqls', '20241107093135-add-quarterly-returns-to-return-versions-up.sql')
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);
});
resolve(data)
})
})
.then(function(data) {
return db.runSql(data);
});
};
.then(function (data) {
return db.runSql(data)
})
}

exports.down = function(db) {
var filePath = path.join(__dirname, 'sqls', '20241107093135-add-quarterly-returns-to-return-versions-down.sql');
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);
exports.down = function (db) {
const filePath = path.join(__dirname, 'sqls', '20241107093135-add-quarterly-returns-to-return-versions-down.sql')
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);
});
resolve(data)
})
})
.then(function(data) {
return db.runSql(data);
});
};
.then(function (data) {
return db.runSql(data)
})
}

exports._meta = {
version: 1
};
}

0 comments on commit 6f3a448

Please sign in to comment.