mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-20 05:31:00 +01:00
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) {
|
removeField (uid) {
|
||||||
this.localFields = this.localFields.filter(field => field._antares_id !== 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) {
|
addNewIndex (payload) {
|
||||||
this.localIndexes = [...this.localIndexes, {
|
this.localIndexes = [...this.localIndexes, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user