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