diff --git a/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue b/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue index 2f856a8b8c..ea4aaf4842 100644 --- a/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue +++ b/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue @@ -251,6 +251,7 @@ --> import { mapGetters } from 'vuex' -// import { isMetaTable } from '@/helpers/xutils' -import XIcon from '@/components/global/xIcon' -import XBtn from '@/components/global/xBtn' import viewIcons from '~/helpers/viewIcons' export default { name: 'DisableOrEnableTables', - components: { - XBtn, - XIcon - }, props: ['nodes', 'db'], data: () => ({ viewIcons, @@ -425,6 +419,9 @@ export default { ...mapGetters({ dbAliasList: 'project/GtrDbAliasList' }), + isChanged() { + return this.diff && this.diff.some(d => d && d.detectedChanges && d.detectedChanges.length) + }, prefix() { return this.$store.getters['project/GtrProjectPrefix'] || '' } diff --git a/packages/nocodb/src/lib/noco/common/handlers/xcMetaDiffSync.ts b/packages/nocodb/src/lib/noco/common/handlers/xcMetaDiffSync.ts index 395d1bb43e..bcc5166061 100644 --- a/packages/nocodb/src/lib/noco/common/handlers/xcMetaDiffSync.ts +++ b/packages/nocodb/src/lib/noco/common/handlers/xcMetaDiffSync.ts @@ -785,8 +785,13 @@ if (sIndex > -1) { populateParams.tableNames = populateParams.tableNames?.filter(t => { return t === populateParams.tableNames.find(t1 => t1.tn === t.tn); }); - await this.xcTablesPopulate(populateParams); - await this.xcTablesPopulate(populateViewsParams); + + // invoke only if there is change in at least one table + if (populateParams.tableNames?.length) { + await this.xcTablesPopulate(populateParams); + } else if (populateViewsParams.tableNames?.length) { + await this.xcTablesPopulate(populateViewsParams); + } if (this instanceof GqlApiBuilder) { await (this as GqlApiBuilder).reInitializeGraphqlEndpoint();