테이블 추가기능 수정사항

This commit is contained in:
kjs
2025-09-23 10:40:21 +09:00
parent 474cc33aee
commit e653effac0
19 changed files with 1931 additions and 201 deletions

View File

@@ -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
);