|
|
@ -16,6 +16,7 @@ import { |
|
|
|
} from 'nocodb-sdk'; |
|
|
|
} from 'nocodb-sdk'; |
|
|
|
import { pluralize, singularize } from 'inflection'; |
|
|
|
import { pluralize, singularize } from 'inflection'; |
|
|
|
import hash from 'object-hash'; |
|
|
|
import hash from 'object-hash'; |
|
|
|
|
|
|
|
import { parseMetaProp } from 'src/utils/modelUtils'; |
|
|
|
import type { |
|
|
|
import type { |
|
|
|
ColumnReqType, |
|
|
|
ColumnReqType, |
|
|
|
LinkToAnotherColumnReqType, |
|
|
|
LinkToAnotherColumnReqType, |
|
|
@ -65,7 +66,6 @@ import Noco from '~/Noco'; |
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
|
import { MetaTable } from '~/utils/globals'; |
|
|
|
import { MetaTable } from '~/utils/globals'; |
|
|
|
import { MetaService } from '~/meta/meta.service'; |
|
|
|
import { MetaService } from '~/meta/meta.service'; |
|
|
|
import { parseMetaProp } from 'src/utils/modelUtils'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// todo: move
|
|
|
|
// todo: move
|
|
|
|
export enum Altered { |
|
|
|
export enum Altered { |
|
|
@ -1674,6 +1674,11 @@ export class ColumnsService { |
|
|
|
param.column.title = param.column.title.trim(); |
|
|
|
param.column.title = param.column.title.trim(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if column_name missing then generate it from title
|
|
|
|
|
|
|
|
if (!param.column.column_name) { |
|
|
|
|
|
|
|
param.column.column_name = param.column.title; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (param.column.column_name) { |
|
|
|
if (param.column.column_name) { |
|
|
|
// - 5 is a buffer for suffix
|
|
|
|
// - 5 is a buffer for suffix
|
|
|
|
let colName = param.column.column_name.slice(0, mxColumnLength - 5); |
|
|
|
let colName = param.column.column_name.slice(0, mxColumnLength - 5); |
|
|
|