From 5150830725170f08c278847617af464b994c7ee9 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 17 Dec 2021 22:36:11 +0530 Subject: [PATCH] feat: meta sync Signed-off-by: Pranav C --- .../sync/disableOrEnableTables.vue | 156 ++++- packages/nocodb/src/example/dockerRunMysql.ts | 2 +- .../nocodb/src/lib/noco/NcProjectBuilder.ts | 3 + .../src/lib/noco/common/BaseApiBuilder.ts | 201 ++++-- .../noco/common/handlers/xcMetaDiffSync.ts | 570 ++++++++++++++++++ .../nocodb/src/lib/noco/gql/GqlApiBuilder.ts | 6 +- .../nocodb/src/lib/noco/meta/NcMetaIOImpl.ts | 2 + .../nocodb/src/lib/noco/meta/NcMetaMgr.ts | 11 +- .../src/lib/noco/meta/handlers/xcMetaDiff.ts | 202 +++++++ .../src/lib/noco/rest/RestApiBuilder.ts | 41 +- .../sqlMgr/code/models/xc/BaseModelXcMeta.ts | 13 +- scripts/metaSync/queries.js | 54 ++ 12 files changed, 1162 insertions(+), 99 deletions(-) create mode 100644 packages/nocodb/src/lib/noco/common/handlers/xcMetaDiffSync.ts create mode 100644 packages/nocodb/src/lib/noco/meta/handlers/xcMetaDiff.ts create mode 100644 scripts/metaSync/queries.js diff --git a/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue b/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue index 65f4ab1cb1..a6658f5822 100644 --- a/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue +++ b/packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue @@ -27,10 +27,20 @@ small color="primary" icon="refresh" - @click="loadModels();loadTableList()" + @click="loadXcDiff()" > Reload + + Models + + + + Actions + + + + + + + + + + + {{ model.title }} + + + + + + mdi-reload + + + + + {{ model.detectedChanges.map(m => m.msg).join(', ') }} + + + + + + - + <!– APIs–> + Actions @@ -63,7 +127,7 @@ - + <!– v-if="model.alias.toLowerCase().indexOf(filter.toLowerCase()) > -1">–>