Skip to content

Commit

Permalink
Use data model title or name
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarbounakis committed Oct 10, 2022
1 parent a57d671 commit ab9bfa6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions data-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -2220,10 +2220,10 @@ DataModel.prototype.migrate = function(callback)
migration.add = _.map(fields, function(x) {
return _.assign({ }, x);
});
migration.version = _.isNil(self.version) ? '0.0' : self.version;
migration.version = self.version != null ? self.version : '0.0';
migration.appliesTo = self.sourceAdapter;
migration.model = self.name;
migration.description = sprintf('%s migration (version %s)', this.title, migration.version);
migration.description = sprintf('%s migration (version %s)', this.title || this.name, migration.version);
if (context===null)
throw new Error('The underlying data context cannot be empty.');

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@themost/data",
"version": "2.7.3",
"version": "2.7.4",
"description": "MOST Web Framework Codename Blueshift - Data module",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ab9bfa6

Please sign in to comment.