@sera4/essentia 1.1.15 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/package.tar.gz +0 -0
- package/paper-trail/README.md +2 -1
- package/paper-trail/index.js +4 -3
package/package.json
CHANGED
package/package.tar.gz
CHANGED
|
Binary file
|
package/paper-trail/README.md
CHANGED
|
@@ -28,7 +28,8 @@ db.PaperTrail = PaperTrail.init(sequelize, Sequelize, { UUID: true, underscored:
|
|
|
28
28
|
debug: false, userModel: 'Account', userModelAttribute: 'account_id',
|
|
29
29
|
enableCompression: true });
|
|
30
30
|
|
|
31
|
-
db.
|
|
31
|
+
// sending in DB will allow you to access this using db['Revision'] later.
|
|
32
|
+
db.PaperTrail.defineModels(db);
|
|
32
33
|
|
|
33
34
|
.. and for any model that needs a papertrail, call hasPaperTrail() on it ..
|
|
34
35
|
db["Tenant"].hasPaperTrail();
|
package/paper-trail/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as jsdiff from 'diff';
|
|
2
2
|
import _ from 'lodash';
|
|
3
3
|
import helpers from './helpers.js';
|
|
4
|
-
import paginator from "../paginator/
|
|
4
|
+
import paginator from "../paginator/sql-pagination.js";
|
|
5
5
|
|
|
6
6
|
let failHard = false;
|
|
7
7
|
let als;
|
|
@@ -595,7 +595,6 @@ paperTrail.init = (sequelize, sequelizePackage, optionsArg) => {
|
|
|
595
595
|
foreignKey: options.defaultAttributes.revisionId,
|
|
596
596
|
constraints: false,
|
|
597
597
|
});
|
|
598
|
-
paginator.paginate(Revision);
|
|
599
598
|
|
|
600
599
|
RevisionChange.belongsTo(Revision);
|
|
601
600
|
|
|
@@ -603,6 +602,8 @@ paperTrail.init = (sequelize, sequelizePackage, optionsArg) => {
|
|
|
603
602
|
db[RevisionChange.name] = RevisionChange;
|
|
604
603
|
}
|
|
605
604
|
|
|
605
|
+
paginator.paginate(Revision);
|
|
606
|
+
|
|
606
607
|
if (db)
|
|
607
608
|
db[Revision.name] = Revision;
|
|
608
609
|
|
|
@@ -633,4 +634,4 @@ paperTrail.enableFailHard = () => {
|
|
|
633
634
|
failHard = true;
|
|
634
635
|
};
|
|
635
636
|
|
|
636
|
-
export default paperTrail;
|
|
637
|
+
export default paperTrail;
|