Browse Source

refactor: schema export sans datatype information

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/2505/head
Raju Udava 2 years ago
parent
commit
a91c8d2085
  1. 1
      packages/nocodb/tests/export-import/config.json
  2. 29
      packages/nocodb/tests/export-import/exportSchema.js

1
packages/nocodb/tests/export-import/config.json

@ -1,6 +1,7 @@
{
"srcProject": "sample",
"dstProject": "sample-copy",
"excludeDt": true,
"baseURL": "http://localhost:8080",
"xc-auth": "Copy Auth Token"
}

29
packages/nocodb/tests/export-import/exportSchema.js

@ -30,22 +30,23 @@ function removeEmpty(obj) {
);
}
function addColumnSpecificData(c) {
// pick required fields to proceed further
let col = removeEmpty(
(({ id, title, column_name, uidt, dt, pk, pv, rqd, dtxp, system }) => ({
id,
title,
column_name,
uidt,
dt,
pk,
pv,
rqd,
dtxp,
system
}))(c)
);
let col;
if(inputConfig.excludeDt) {
col = removeEmpty(
(({ id, title, column_name, uidt, pk, pv, rqd, dtxp, system, ai }) => ({
id, title, column_name, uidt, pk, pv, rqd, dtxp, system, ai
}))(c)
);
} else {
col = removeEmpty(
(({ id, title, column_name, uidt, dt, pk, pv, rqd, dtxp, system, ai }) => ({
id, title, column_name, uidt, dt, pk, pv, rqd, dtxp, system, ai
}))(c)
);
}
switch (c.uidt) {
case UITypes.Formula:

Loading…
Cancel
Save