|
|
@ -70,27 +70,26 @@ export default async ( |
|
|
|
progress: (data: { msg?: string; level?: any }) => void |
|
|
|
progress: (data: { msg?: string; level?: any }) => void |
|
|
|
) => { |
|
|
|
) => { |
|
|
|
const sMapEM = new EntityMap('aTblId', 'ncId', 'ncName', 'ncParent'); |
|
|
|
const sMapEM = new EntityMap('aTblId', 'ncId', 'ncName', 'ncParent'); |
|
|
|
await sMapEM.init(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const sMap = { |
|
|
|
const sMap = { |
|
|
|
// static mapping records between aTblId && ncId
|
|
|
|
// static mapping records between aTblId && ncId
|
|
|
|
async addToMappingTbl(aTblId, ncId, ncName, ncParent?) { |
|
|
|
addToMappingTbl(aTblId, ncId, ncName, ncParent?) { |
|
|
|
await sMapEM.addRow({ aTblId, ncId, ncName, ncParent }); |
|
|
|
sMapEM.addRow({ aTblId, ncId, ncName, ncParent }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// get NcID from airtable ID
|
|
|
|
// get NcID from airtable ID
|
|
|
|
async getNcIdFromAtId(aId) { |
|
|
|
getNcIdFromAtId(aId) { |
|
|
|
return (await sMapEM.getRow('aTblId', aId, ['ncId']))?.ncId; |
|
|
|
return sMapEM.getRow('aTblId', aId, ['ncId'])?.ncId; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// get nc Parent from airtable ID
|
|
|
|
// get nc Parent from airtable ID
|
|
|
|
async getNcParentFromAtId(aId) { |
|
|
|
getNcParentFromAtId(aId) { |
|
|
|
return (await sMapEM.getRow('aTblId', aId, ['ncParent']))?.ncParent; |
|
|
|
return sMapEM.getRow('aTblId', aId, ['ncParent'])?.ncParent; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// get nc-title from airtable ID
|
|
|
|
// get nc-title from airtable ID
|
|
|
|
async getNcNameFromAtId(aId) { |
|
|
|
getNcNameFromAtId(aId) { |
|
|
|
return (await sMapEM.getRow('aTblId', aId, ['ncName']))?.ncName; |
|
|
|
return sMapEM.getRow('aTblId', aId, ['ncName'])?.ncName; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -331,8 +330,8 @@ export default async ( |
|
|
|
// let ncCol = ncTbl.columns.find(x => x.title === aTblField.cn);
|
|
|
|
// let ncCol = ncTbl.columns.find(x => x.title === aTblField.cn);
|
|
|
|
// return ncCol;
|
|
|
|
// return ncCol;
|
|
|
|
|
|
|
|
|
|
|
|
const ncTblId = await sMap.getNcParentFromAtId(aTblFieldId); |
|
|
|
const ncTblId = sMap.getNcParentFromAtId(aTblFieldId); |
|
|
|
const ncColId = await sMap.getNcIdFromAtId(aTblFieldId); |
|
|
|
const ncColId = sMap.getNcIdFromAtId(aTblFieldId); |
|
|
|
|
|
|
|
|
|
|
|
// not migrated column, skip
|
|
|
|
// not migrated column, skip
|
|
|
|
if (ncColId === undefined || ncTblId === undefined) return 0; |
|
|
|
if (ncColId === undefined || ncTblId === undefined) return 0; |
|
|
@ -460,7 +459,7 @@ export default async ( |
|
|
|
: tinycolor.random().toHexString(), |
|
|
|
: tinycolor.random().toHexString(), |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
(value as any).id, |
|
|
|
(value as any).id, |
|
|
|
undefined, |
|
|
|
undefined, |
|
|
|
(value as any).name |
|
|
|
(value as any).name |
|
|
@ -563,7 +562,7 @@ export default async ( |
|
|
|
if (col.type === 'text') ncCol.dt = 'text'; |
|
|
|
if (col.type === 'text') ncCol.dt = 'text'; |
|
|
|
|
|
|
|
|
|
|
|
// #fix-2363-decimal-out-of-range
|
|
|
|
// #fix-2363-decimal-out-of-range
|
|
|
|
if (['sqlite3', 'mysql2'].includes(getRootDbType())) { |
|
|
|
if (['sqlite3', 'better-sqlite3', 'mysql2'].includes(getRootDbType())) { |
|
|
|
if (ncCol.uidt === UITypes.Decimal) { |
|
|
|
if (ncCol.uidt === UITypes.Decimal) { |
|
|
|
ncCol.dt = 'double'; |
|
|
|
ncCol.dt = 'double'; |
|
|
|
ncCol.dtxp = 22; |
|
|
|
ncCol.dtxp = 22; |
|
|
@ -623,14 +622,14 @@ export default async ( |
|
|
|
updateNcTblSchema(table); |
|
|
|
updateNcTblSchema(table); |
|
|
|
|
|
|
|
|
|
|
|
// update mapping table
|
|
|
|
// update mapping table
|
|
|
|
await sMap.addToMappingTbl(aTblSchema[idx].id, table.id, table.title); |
|
|
|
sMap.addToMappingTbl(aTblSchema[idx].id, table.id, table.title); |
|
|
|
for (let colIdx = 0; colIdx < table.columns.length; colIdx++) { |
|
|
|
for (let colIdx = 0; colIdx < table.columns.length; colIdx++) { |
|
|
|
const aId = aTblSchema[idx].columns.find( |
|
|
|
const aId = aTblSchema[idx].columns.find( |
|
|
|
(x) => |
|
|
|
(x) => |
|
|
|
x.name.trim().replace(/\./g, '_') === table.columns[colIdx].title |
|
|
|
x.name.trim().replace(/\./g, '_') === table.columns[colIdx].title |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
if (aId) |
|
|
|
if (aId) |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
aId, |
|
|
|
aId, |
|
|
|
table.columns[colIdx].id, |
|
|
|
table.columns[colIdx].id, |
|
|
|
table.columns[colIdx].title, |
|
|
|
table.columns[colIdx].title, |
|
|
@ -654,7 +653,7 @@ export default async ( |
|
|
|
|
|
|
|
|
|
|
|
await updateNcTblSchemaById(table.id); |
|
|
|
await updateNcTblSchemaById(table.id); |
|
|
|
|
|
|
|
|
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
aTbl_grid.id, |
|
|
|
aTbl_grid.id, |
|
|
|
table.views[0].id, |
|
|
|
table.views[0].id, |
|
|
|
aTbl_grid.name, |
|
|
|
aTbl_grid.name, |
|
|
@ -699,7 +698,7 @@ export default async ( |
|
|
|
if (!nc_isLinkExists(aTblLinkColumns[i].id)) { |
|
|
|
if (!nc_isLinkExists(aTblLinkColumns[i].id)) { |
|
|
|
// parent table ID
|
|
|
|
// parent table ID
|
|
|
|
// let srcTableId = (await nc_getTableSchema(aTblSchema[idx].name)).id;
|
|
|
|
// let srcTableId = (await nc_getTableSchema(aTblSchema[idx].name)).id;
|
|
|
|
const srcTableId = await sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const srcTableId = sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
|
|
|
|
|
|
|
|
// find child table name from symmetric column ID specified
|
|
|
|
// find child table name from symmetric column ID specified
|
|
|
|
// self link, symmetricColumnId field will be undefined
|
|
|
|
// self link, symmetricColumnId field will be undefined
|
|
|
@ -750,7 +749,7 @@ export default async ( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
(x) => x.title === ncName.title |
|
|
|
(x) => x.title === ncName.title |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
aTblLinkColumns[i].id, |
|
|
|
aTblLinkColumns[i].id, |
|
|
|
ncId, |
|
|
|
ncId, |
|
|
|
ncName.title, |
|
|
|
ncName.title, |
|
|
@ -891,7 +890,7 @@ export default async ( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
(x) => x.title === aTblLinkColumns[i].name + suffix |
|
|
|
(x) => x.title === aTblLinkColumns[i].name + suffix |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
aTblLinkColumns[i].id, |
|
|
|
aTblLinkColumns[i].id, |
|
|
|
ncId, |
|
|
|
ncId, |
|
|
|
aTblLinkColumns[i].name + suffix, |
|
|
|
aTblLinkColumns[i].name + suffix, |
|
|
@ -914,7 +913,7 @@ export default async ( |
|
|
|
|
|
|
|
|
|
|
|
// parent table ID
|
|
|
|
// parent table ID
|
|
|
|
// let srcTableId = (await nc_getTableSchema(aTblSchema[idx].name)).id;
|
|
|
|
// let srcTableId = (await nc_getTableSchema(aTblSchema[idx].name)).id;
|
|
|
|
const srcTableId = await sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const srcTableId = sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
|
|
|
|
|
|
|
|
if (aTblColumns.length) { |
|
|
|
if (aTblColumns.length) { |
|
|
@ -942,10 +941,10 @@ export default async ( |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const ncRelationColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncRelationColumnId = sMap.getNcIdFromAtId( |
|
|
|
aTblColumns[i].typeOptions.relationColumnId |
|
|
|
aTblColumns[i].typeOptions.relationColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
const ncLookupColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncLookupColumnId = sMap.getNcIdFromAtId( |
|
|
|
aTblColumns[i].typeOptions.foreignTableRollupColumnId |
|
|
|
aTblColumns[i].typeOptions.foreignTableRollupColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -979,7 +978,7 @@ export default async ( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
(x) => x.title === aTblColumns[i].name |
|
|
|
(x) => x.title === aTblColumns[i].name |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
aTblColumns[i].id, |
|
|
|
aTblColumns[i].id, |
|
|
|
ncId, |
|
|
|
ncId, |
|
|
|
aTblColumns[i].name, |
|
|
|
aTblColumns[i].name, |
|
|
@ -1018,10 +1017,10 @@ export default async ( |
|
|
|
const srcTableId = nestedLookupTbl[0].srcTableId; |
|
|
|
const srcTableId = nestedLookupTbl[0].srcTableId; |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
|
|
|
|
|
|
|
|
const ncRelationColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncRelationColumnId = sMap.getNcIdFromAtId( |
|
|
|
nestedLookupTbl[0].typeOptions.relationColumnId |
|
|
|
nestedLookupTbl[0].typeOptions.relationColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
const ncLookupColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncLookupColumnId = sMap.getNcIdFromAtId( |
|
|
|
nestedLookupTbl[0].typeOptions.foreignTableRollupColumnId |
|
|
|
nestedLookupTbl[0].typeOptions.foreignTableRollupColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -1059,7 +1058,7 @@ export default async ( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
(x) => x.title === nestedLookupTbl[0].name |
|
|
|
(x) => x.title === nestedLookupTbl[0].name |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
nestedLookupTbl[0].id, |
|
|
|
nestedLookupTbl[0].id, |
|
|
|
ncId, |
|
|
|
ncId, |
|
|
|
nestedLookupTbl[0].name, |
|
|
|
nestedLookupTbl[0].name, |
|
|
@ -1104,7 +1103,7 @@ export default async ( |
|
|
|
|
|
|
|
|
|
|
|
// parent table ID
|
|
|
|
// parent table ID
|
|
|
|
// let srcTableId = (await nc_getTableSchema(aTblSchema[idx].name)).id;
|
|
|
|
// let srcTableId = (await nc_getTableSchema(aTblSchema[idx].name)).id;
|
|
|
|
const srcTableId = await sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const srcTableId = sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
|
|
|
|
|
|
|
|
if (aTblColumns.length) { |
|
|
|
if (aTblColumns.length) { |
|
|
@ -1149,10 +1148,10 @@ export default async ( |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const ncRelationColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncRelationColumnId = sMap.getNcIdFromAtId( |
|
|
|
aTblColumns[i].typeOptions.relationColumnId |
|
|
|
aTblColumns[i].typeOptions.relationColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
const ncRollupColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncRollupColumnId = sMap.getNcIdFromAtId( |
|
|
|
aTblColumns[i].typeOptions.foreignTableRollupColumnId |
|
|
|
aTblColumns[i].typeOptions.foreignTableRollupColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -1203,7 +1202,7 @@ export default async ( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
(x) => x.title === aTblColumns[i].name |
|
|
|
(x) => x.title === aTblColumns[i].name |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
aTblColumns[i].id, |
|
|
|
aTblColumns[i].id, |
|
|
|
ncId, |
|
|
|
ncId, |
|
|
|
aTblColumns[i].name, |
|
|
|
aTblColumns[i].name, |
|
|
@ -1222,10 +1221,10 @@ export default async ( |
|
|
|
const srcTableId = nestedLookupTbl[0].srcTableId; |
|
|
|
const srcTableId = nestedLookupTbl[0].srcTableId; |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
const srcTableSchema = ncSchema.tablesById[srcTableId]; |
|
|
|
|
|
|
|
|
|
|
|
const ncRelationColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncRelationColumnId = sMap.getNcIdFromAtId( |
|
|
|
nestedLookupTbl[0].typeOptions.relationColumnId |
|
|
|
nestedLookupTbl[0].typeOptions.relationColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
const ncLookupColumnId = await sMap.getNcIdFromAtId( |
|
|
|
const ncLookupColumnId = sMap.getNcIdFromAtId( |
|
|
|
nestedLookupTbl[0].typeOptions.foreignTableRollupColumnId |
|
|
|
nestedLookupTbl[0].typeOptions.foreignTableRollupColumnId |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -1260,7 +1259,7 @@ export default async ( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
const ncId = ncTbl.columns.find( |
|
|
|
(x) => x.title === nestedLookupTbl[0].name |
|
|
|
(x) => x.title === nestedLookupTbl[0].name |
|
|
|
)?.id; |
|
|
|
)?.id; |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
nestedLookupTbl[0].id, |
|
|
|
nestedLookupTbl[0].id, |
|
|
|
ncId, |
|
|
|
ncId, |
|
|
|
nestedLookupTbl[0].name, |
|
|
|
nestedLookupTbl[0].name, |
|
|
@ -1281,7 +1280,7 @@ export default async ( |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const pColId = aTblSchema[idx].primaryColumnId; |
|
|
|
const pColId = aTblSchema[idx].primaryColumnId; |
|
|
|
const ncColId = await sMap.getNcIdFromAtId(pColId); |
|
|
|
const ncColId = sMap.getNcIdFromAtId(pColId); |
|
|
|
|
|
|
|
|
|
|
|
// skip primary column configuration if we field not migrated
|
|
|
|
// skip primary column configuration if we field not migrated
|
|
|
|
if (ncColId) { |
|
|
|
if (ncColId) { |
|
|
@ -1291,7 +1290,7 @@ export default async ( |
|
|
|
recordPerfStats(_perfStart, 'dbTableColumn.primaryColumnSet'); |
|
|
|
recordPerfStats(_perfStart, 'dbTableColumn.primaryColumnSet'); |
|
|
|
|
|
|
|
|
|
|
|
// update schema
|
|
|
|
// update schema
|
|
|
|
const ncTblId = await sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const ncTblId = sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
await updateNcTblSchemaById(ncTblId); |
|
|
|
await updateNcTblSchemaById(ncTblId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1581,7 +1580,7 @@ export default async ( |
|
|
|
async function nocoConfigureFormView(sDB, aTblSchema) { |
|
|
|
async function nocoConfigureFormView(sDB, aTblSchema) { |
|
|
|
if (!sDB.options.syncViews) return; |
|
|
|
if (!sDB.options.syncViews) return; |
|
|
|
for (let idx = 0; idx < aTblSchema.length; idx++) { |
|
|
|
for (let idx = 0; idx < aTblSchema.length; idx++) { |
|
|
|
const tblId = await sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const tblId = sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const formViews = aTblSchema[idx].views.filter((x) => x.type === 'form'); |
|
|
|
const formViews = aTblSchema[idx].views.filter((x) => x.type === 'form'); |
|
|
|
|
|
|
|
|
|
|
|
const configuredViews = rtc.view.grid + rtc.view.gallery + rtc.view.form; |
|
|
|
const configuredViews = rtc.view.grid + rtc.view.gallery + rtc.view.form; |
|
|
@ -1653,7 +1652,7 @@ export default async ( |
|
|
|
|
|
|
|
|
|
|
|
async function nocoConfigureGridView(sDB, aTblSchema) { |
|
|
|
async function nocoConfigureGridView(sDB, aTblSchema) { |
|
|
|
for (let idx = 0; idx < aTblSchema.length; idx++) { |
|
|
|
for (let idx = 0; idx < aTblSchema.length; idx++) { |
|
|
|
const tblId = await sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const tblId = sMap.getNcIdFromAtId(aTblSchema[idx].id); |
|
|
|
const gridViews = aTblSchema[idx].views.filter((x) => x.type === 'grid'); |
|
|
|
const gridViews = aTblSchema[idx].views.filter((x) => x.type === 'grid'); |
|
|
|
|
|
|
|
|
|
|
|
let viewCnt = idx; |
|
|
|
let viewCnt = idx; |
|
|
@ -1692,7 +1691,7 @@ export default async ( |
|
|
|
recordPerfStats(_perfStart, 'dbView.gridCreate'); |
|
|
|
recordPerfStats(_perfStart, 'dbView.gridCreate'); |
|
|
|
|
|
|
|
|
|
|
|
await updateNcTblSchemaById(tblId); |
|
|
|
await updateNcTblSchemaById(tblId); |
|
|
|
await sMap.addToMappingTbl( |
|
|
|
sMap.addToMappingTbl( |
|
|
|
gridViews[i].id, |
|
|
|
gridViews[i].id, |
|
|
|
viewCreated.id, |
|
|
|
viewCreated.id, |
|
|
|
viewName, |
|
|
|
viewName, |
|
|
@ -1969,7 +1968,7 @@ export default async ( |
|
|
|
// one of not migrated column;
|
|
|
|
// one of not migrated column;
|
|
|
|
if (!colSchema) { |
|
|
|
if (!colSchema) { |
|
|
|
updateMigrationSkipLog( |
|
|
|
updateMigrationSkipLog( |
|
|
|
await sMap.getNcNameFromAtId(viewId), |
|
|
|
sMap.getNcNameFromAtId(viewId), |
|
|
|
colSchema.title, |
|
|
|
colSchema.title, |
|
|
|
colSchema.uidt, |
|
|
|
colSchema.uidt, |
|
|
|
`filter config skipped; column not migrated` |
|
|
|
`filter config skipped; column not migrated` |
|
|
@ -1984,7 +1983,7 @@ export default async ( |
|
|
|
if (datatype === UITypes.Date || datatype === UITypes.DateTime) { |
|
|
|
if (datatype === UITypes.Date || datatype === UITypes.DateTime) { |
|
|
|
// skip filters over data datatype
|
|
|
|
// skip filters over data datatype
|
|
|
|
updateMigrationSkipLog( |
|
|
|
updateMigrationSkipLog( |
|
|
|
await sMap.getNcNameFromAtId(viewId), |
|
|
|
sMap.getNcNameFromAtId(viewId), |
|
|
|
colSchema.title, |
|
|
|
colSchema.title, |
|
|
|
colSchema.uidt, |
|
|
|
colSchema.uidt, |
|
|
|
`filter config skipped; filter over date datatype not supported` |
|
|
|
`filter config skipped; filter over date datatype not supported` |
|
|
@ -2004,7 +2003,7 @@ export default async ( |
|
|
|
fk_column_id: columnId, |
|
|
|
fk_column_id: columnId, |
|
|
|
logical_op: f.conjunction, |
|
|
|
logical_op: f.conjunction, |
|
|
|
comparison_op: filterMap[filter.operator], |
|
|
|
comparison_op: filterMap[filter.operator], |
|
|
|
value: await sMap.getNcNameFromAtId(filter.value[i]), |
|
|
|
value: sMap.getNcNameFromAtId(filter.value[i]), |
|
|
|
}; |
|
|
|
}; |
|
|
|
ncFilters.push(fx); |
|
|
|
ncFilters.push(fx); |
|
|
|
} |
|
|
|
} |
|
|
@ -2015,7 +2014,7 @@ export default async ( |
|
|
|
fk_column_id: columnId, |
|
|
|
fk_column_id: columnId, |
|
|
|
logical_op: f.conjunction, |
|
|
|
logical_op: f.conjunction, |
|
|
|
comparison_op: filterMap[filter.operator], |
|
|
|
comparison_op: filterMap[filter.operator], |
|
|
|
value: await sMap.getNcNameFromAtId(filter.value), |
|
|
|
value: sMap.getNcNameFromAtId(filter.value), |
|
|
|
}; |
|
|
|
}; |
|
|
|
ncFilters.push(fx); |
|
|
|
ncFilters.push(fx); |
|
|
|
} |
|
|
|
} |
|
|
@ -2111,7 +2110,7 @@ export default async ( |
|
|
|
|
|
|
|
|
|
|
|
// rest of the columns from airtable- retain order & visibility property
|
|
|
|
// rest of the columns from airtable- retain order & visibility property
|
|
|
|
for (let j = 0; j < c.length; j++) { |
|
|
|
for (let j = 0; j < c.length; j++) { |
|
|
|
const ncColumnId = await sMap.getNcIdFromAtId(c[j].columnId); |
|
|
|
const ncColumnId = sMap.getNcIdFromAtId(c[j].columnId); |
|
|
|
const ncViewColumnId = await nc_getViewColumnId( |
|
|
|
const ncViewColumnId = await nc_getViewColumnId( |
|
|
|
viewId, |
|
|
|
viewId, |
|
|
|
viewType, |
|
|
|
viewType, |
|
|
@ -2257,7 +2256,7 @@ export default async ( |
|
|
|
sDB: syncDB, |
|
|
|
sDB: syncDB, |
|
|
|
logDetailed, |
|
|
|
logDetailed, |
|
|
|
}); |
|
|
|
}); |
|
|
|
rtc.data.records += await recordsMap[ncTbl.id].getCount(); |
|
|
|
rtc.data.records += recordsMap[ncTbl.id].getCount(); |
|
|
|
|
|
|
|
|
|
|
|
logDetailed(`Data inserted from ${ncTbl.title}`); |
|
|
|
logDetailed(`Data inserted from ${ncTbl.title}`); |
|
|
|
} |
|
|
|
} |
|
|
|