Skip to content

Commit

Permalink
Run Prettier across project
Browse files Browse the repository at this point in the history
Prettier got disabled sometime recently, I have re-enabled it and run it
across the entire project
  • Loading branch information
Andrew Isherwood committed Sep 14, 2020
1 parent 1f41516 commit f38d664
Show file tree
Hide file tree
Showing 29 changed files with 942 additions and 718 deletions.
60 changes: 29 additions & 31 deletions migrations/20200406100555-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,44 @@ 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;
* 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) {
var filePath = path.join(__dirname, 'sqls', '20200406100555-init-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) {
var filePath = path.join(__dirname, 'sqls', '20200406100555-init-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', '20200406100555-init-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) {
var filePath = path.join(__dirname, 'sqls', '20200406100555-init-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
version: 1
};
68 changes: 37 additions & 31 deletions migrations/20200416140501-add-indexes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,52 @@ 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;
* 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) {
var filePath = path.join(__dirname, 'sqls', '20200416140501-add-indexes-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) {
var filePath = path.join(
__dirname,
'sqls',
'20200416140501-add-indexes-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', '20200416140501-add-indexes-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) {
var filePath = path.join(
__dirname,
'sqls',
'20200416140501-add-indexes-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
version: 1
};
68 changes: 37 additions & 31 deletions migrations/20200421093333-fix-attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,52 @@ 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;
* 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) {
var filePath = path.join(__dirname, 'sqls', '20200421093333-fix-attachments-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) {
var filePath = path.join(
__dirname,
'sqls',
'20200421093333-fix-attachments-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', '20200421093333-fix-attachments-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) {
var filePath = path.join(
__dirname,
'sqls',
'20200421093333-fix-attachments-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
version: 1
};
68 changes: 37 additions & 31 deletions migrations/20200421095758-add-default-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,52 @@ 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;
* 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) {
var filePath = path.join(__dirname, 'sqls', '20200421095758-add-default-roles-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) {
var filePath = path.join(
__dirname,
'sqls',
'20200421095758-add-default-roles-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', '20200421095758-add-default-roles-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) {
var filePath = path.join(
__dirname,
'sqls',
'20200421095758-add-default-roles-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
version: 1
};
Loading

0 comments on commit f38d664

Please sign in to comment.