Bug fix: Check structure
This commit is contained in:
parent
85499e837c
commit
fc19ac2672
5
index.js
5
index.js
@ -320,6 +320,11 @@ class Instance {
|
||||
errors: [],
|
||||
passed: []
|
||||
}
|
||||
for (let col of dbStruc){ // Check if current table has a field that is not defined
|
||||
if (!desiredStructure.find(dsStruc => dsStruc.Field === col.Field)){
|
||||
result.errors.push(`${col.Field}: Existing, but not defined`);
|
||||
}
|
||||
}
|
||||
for (let col of desiredStructure){
|
||||
const dbCol = dbStruc.find((dbCol) => col.Field === dbCol.Field); // Check if the current table has the field
|
||||
if (!dbCol) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user