lms-sync 1.0.51 → 1.0.55
Sign up to get free protection for your applications and to get access to all the features.
@@ -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){
|
@@ -2442,11 +2450,6 @@ async function runServerFunctions() {
|
|
2442
2450
|
console.log("########################################################");
|
2443
2451
|
}
|
2444
2452
|
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
// module.exports = server
|
2449
|
-
|
2450
2453
|
module.exports = {
|
2451
2454
|
serverTable: server,
|
2452
2455
|
Campus: server.Campus,
|
@@ -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,
|