lms-sync 1.0.50 → 1.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/apiConnections/mapping.js +9 -1
- package/models/academicDepartmentInstructor.model.js +16 -0
- package/package.json +1 -1
- package/recordError.log +0 -4832
- package/recordSuccess.log +1 -969
- package/login.json +0 -5
- package/target.json +0 -9
@@ -906,6 +906,11 @@ const server = {
|
|
906
906
|
let _instructor = instructorSeq.find(num => num.employeeNumber === instructor?.faculty_id)
|
907
907
|
let _department = departmentSeq.find(dep => dep._id === _instructor?.departmentId)
|
908
908
|
|
909
|
+
let migratedAt = new Date() //present date of the migration
|
910
|
+
let migratedTable = 'Instructors' // sql counterpart main table
|
911
|
+
let referenceId = _instructor?.id // id of the data
|
912
|
+
let isMigrated = true
|
913
|
+
|
909
914
|
let modifiedById = userMail._id
|
910
915
|
let createdById = userMail._id
|
911
916
|
|
@@ -918,7 +923,10 @@ const server = {
|
|
918
923
|
instructorId: _instructor?._id,
|
919
924
|
academicDepartmentId: _department?._id,
|
920
925
|
modifiedById,
|
921
|
-
createdById
|
926
|
+
createdById,
|
927
|
+
migratedAt,
|
928
|
+
migratedTable,
|
929
|
+
isMigrated,
|
922
930
|
}
|
923
931
|
})
|
924
932
|
if (created){
|
@@ -42,6 +42,22 @@ module.exports = (sequelize, DataTypes,schema) => {
|
|
42
42
|
autoIncrement: false,
|
43
43
|
primaryKey: false,
|
44
44
|
},
|
45
|
+
migratedAt:{
|
46
|
+
type: DataTypes.DATE,
|
47
|
+
allowNull: true,
|
48
|
+
},
|
49
|
+
migratedTable:{
|
50
|
+
type: DataTypes.STRING,
|
51
|
+
allowNull: true,
|
52
|
+
},
|
53
|
+
referenceId:{
|
54
|
+
type: DataTypes.INTEGER,
|
55
|
+
allowNull: true,
|
56
|
+
},
|
57
|
+
isMigrated:{
|
58
|
+
type: DataTypes.BOOLEAN,
|
59
|
+
allowNull: true,
|
60
|
+
},
|
45
61
|
},
|
46
62
|
{
|
47
63
|
sequelize,
|