Skip to content

Commit

Permalink
fix: resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
samwel141 committed May 4, 2024
2 parents b347e2f + a320f19 commit e5e0766
Show file tree
Hide file tree
Showing 19 changed files with 18,529 additions and 13,131 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [1.38.0](https://github.com/Greenstand/treetracker-wallet-api/compare/v1.37.0...v1.38.0) (2024-04-29)


### Bug Fixes

* update patch endpoint ([1c6e69d](https://github.com/Greenstand/treetracker-wallet-api/commit/1c6e69d56b6d0226b184c2d1b02cd0bbb06dce01))


### Features

* add cover URL to wallet table ([3ae0efa](https://github.com/Greenstand/treetracker-wallet-api/commit/3ae0efa5ffc9a06a489e96c6f5d3cbd83ecff020))
* customize wallet ([3bed228](https://github.com/Greenstand/treetracker-wallet-api/commit/3bed228f7b16273592569512011952404a10a6d6))
* customize wallet ([c1ae9be](https://github.com/Greenstand/treetracker-wallet-api/commit/c1ae9bec65ce678567a041d438113f664c66679a))

# [1.37.0](https://github.com/Greenstand/treetracker-wallet-api/compare/v1.36.0...v1.37.0) (2024-04-22)


Expand Down
59 changes: 59 additions & 0 deletions database/migrations/20240412001733-AddCoverUrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
'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) {
var filePath = path.join(
__dirname,
'sqls',
'20240412001733-AddCoverUrl-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);
});
}).then(function (data) {
return db.runSql(data);
});
};

exports.down = function (db) {
var filePath = path.join(
__dirname,
'sqls',
'20240412001733-AddCoverUrl-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);
});
}).then(function (data) {
return db.runSql(data);
});
};

exports._meta = {
version: 1,
};
53 changes: 53 additions & 0 deletions database/migrations/20240422141722-add-display-name.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'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) {
var filePath = path.join(__dirname, 'sqls', '20240422141722-add-display-name-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);
});
})
.then(function(data) {
return db.runSql(data);
});
};

exports.down = function(db) {
var filePath = path.join(__dirname, 'sqls', '20240422141722-add-display-name-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);
});
})
.then(function(data) {
return db.runSql(data);
});
};

exports._meta = {
"version": 1
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE wallet DROP COLUMN cover_url;
1 change: 1 addition & 0 deletions database/migrations/sqls/20240412001733-AddCoverUrl-up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE wallet ADD COLUMN cover_url varchar;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE wallet DROP COLUMN display_name;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE wallet ADD COLUMN display_name varchar;
Loading

0 comments on commit e5e0766

Please sign in to comment.