테이블 추가기능 수정사항
This commit is contained in:
@@ -42,11 +42,17 @@ export class DDLController {
|
||||
ip: req.ip,
|
||||
});
|
||||
|
||||
// inputType을 webType으로 변환 (레거시 호환성)
|
||||
const processedColumns = columns.map((col) => ({
|
||||
...col,
|
||||
webType: (col.inputType || col.webType || "text") as any,
|
||||
}));
|
||||
|
||||
// DDL 실행 서비스 호출
|
||||
const ddlService = new DDLExecutionService();
|
||||
const result = await ddlService.createTable(
|
||||
tableName,
|
||||
columns,
|
||||
processedColumns,
|
||||
userCompanyCode,
|
||||
userId,
|
||||
description
|
||||
@@ -112,12 +118,12 @@ export class DDLController {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!column || !column.name || !column.webType) {
|
||||
if (!column || !column.name || (!column.inputType && !column.webType)) {
|
||||
res.status(400).json({
|
||||
success: false,
|
||||
error: {
|
||||
code: "INVALID_INPUT",
|
||||
details: "컬럼명과 웹타입이 필요합니다.",
|
||||
details: "컬럼명과 입력타입이 필요합니다.",
|
||||
},
|
||||
});
|
||||
return;
|
||||
@@ -131,11 +137,17 @@ export class DDLController {
|
||||
ip: req.ip,
|
||||
});
|
||||
|
||||
// inputType을 webType으로 변환 (레거시 호환성)
|
||||
const processedColumn = {
|
||||
...column,
|
||||
webType: (column.inputType || column.webType || "text") as any,
|
||||
};
|
||||
|
||||
// DDL 실행 서비스 호출
|
||||
const ddlService = new DDLExecutionService();
|
||||
const result = await ddlService.addColumn(
|
||||
tableName,
|
||||
column,
|
||||
processedColumn,
|
||||
userCompanyCode,
|
||||
userId
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user