|
|
@ -167,6 +167,10 @@ export default async ( |
|
|
|
return ft.view; |
|
|
|
return ft.view; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getRootDbType() { |
|
|
|
|
|
|
|
return ncCreatedProjectSchema?.bases[0]?.type; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// base mapping table
|
|
|
|
// base mapping table
|
|
|
|
const aTblNcTypeMap = { |
|
|
|
const aTblNcTypeMap = { |
|
|
|
foreignKey: UITypes.LinkToAnotherRecord, |
|
|
|
foreignKey: UITypes.LinkToAnotherRecord, |
|
|
@ -488,10 +492,14 @@ export default async ( |
|
|
|
// change from default 'tinytext' as airtable allows more than 255 characters
|
|
|
|
// change from default 'tinytext' as airtable allows more than 255 characters
|
|
|
|
// for single line text column type
|
|
|
|
// for single line text column type
|
|
|
|
if (col.type === 'text') ncCol.dt = 'text'; |
|
|
|
if (col.type === 'text') ncCol.dt = 'text'; |
|
|
|
if (ncCol.uidt === UITypes.Decimal) { |
|
|
|
|
|
|
|
ncCol.dt = 'double'; |
|
|
|
// #fix-2363-decimal-out-of-range
|
|
|
|
ncCol.dtxp = 22; |
|
|
|
if (['sqlite3', 'mysql2'].includes(getRootDbType())) { |
|
|
|
ncCol.dtxs = '2'; |
|
|
|
if (ncCol.uidt === UITypes.Decimal) { |
|
|
|
|
|
|
|
ncCol.dt = 'double'; |
|
|
|
|
|
|
|
ncCol.dtxp = 22; |
|
|
|
|
|
|
|
ncCol.dtxs = '2'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// additional column parameters when applicable
|
|
|
|
// additional column parameters when applicable
|
|
|
|