mirror of https://github.com/Fabio286/antares.git
fix: indexes and foreign keys not cleared after deletion of related field, closes #182
This commit is contained in:
parent
401cb49687
commit
9f033fb994
|
@ -616,6 +616,14 @@ export default {
|
|||
},
|
||||
removeField (uid) {
|
||||
this.localFields = this.localFields.filter(field => field._antares_id !== uid);
|
||||
this.localKeyUsage = this.localKeyUsage.filter(fk =>// Clear foreign keys
|
||||
this.localFields.some(field => field.name === fk.field)
|
||||
);
|
||||
this.localIndexes = this.localIndexes.filter(index =>// Clear indexes
|
||||
this.localFields.some(field =>
|
||||
index.fields.includes(field.name)
|
||||
)
|
||||
);
|
||||
},
|
||||
addNewIndex (payload) {
|
||||
this.localIndexes = [...this.localIndexes, {
|
||||
|
|
Loading…
Reference in New Issue