diff options
| author | joonhoekim <26rote@gmail.com> | 2025-07-23 05:55:31 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-07-23 05:55:31 +0000 |
| commit | edc0eabc8f5fc44408c28023ca155bd73ddf8183 (patch) | |
| tree | 8469a2d932008f2fb5aae9be854cba436b9f807b /db/schema | |
| parent | e1b1b57b6bfcd18ba4daa44230e8a915b4e93a15 (diff) | |
(김준회) Knox 임직원 기준으로 users 테이블 upsert 처리 (cron-job과 동기식 처리)
Diffstat (limited to 'db/schema')
| -rw-r--r-- | db/schema/index.ts | 3 | ||||
| -rw-r--r-- | db/schema/knox/organization.ts | 6 | ||||
| -rw-r--r-- | db/schema/knox/titles.ts | 5 | ||||
| -rw-r--r-- | db/schema/users.ts | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/db/schema/index.ts b/db/schema/index.ts index db449616..19470fca 100644 --- a/db/schema/index.ts +++ b/db/schema/index.ts @@ -30,6 +30,9 @@ export * from './history'; export * from './notification'; export * from './templates'; +// 부서별 도메인 할당 관리 +export * from './departmentDomainAssignments'; + // MDG SOAP 수신용 export * from './MDG/mdg' diff --git a/db/schema/knox/organization.ts b/db/schema/knox/organization.ts index 48b13254..8d540562 100644 --- a/db/schema/knox/organization.ts +++ b/db/schema/knox/organization.ts @@ -1,7 +1,5 @@ -import { pgSchema, varchar, jsonb, timestamp, index, primaryKey } from "drizzle-orm/pg-core"; - -// Knox 전용 스키마 네임스페이스 재사용 -export const knoxSchema = pgSchema("knox"); +import { varchar, jsonb, timestamp, index, primaryKey } from "drizzle-orm/pg-core"; +import { knoxSchema } from "./employee"; export const organization = knoxSchema.table( "organization", diff --git a/db/schema/knox/titles.ts b/db/schema/knox/titles.ts index 338ba79b..6fdf7329 100644 --- a/db/schema/knox/titles.ts +++ b/db/schema/knox/titles.ts @@ -1,6 +1,5 @@ -import { pgSchema, varchar, jsonb, timestamp, index, primaryKey } from "drizzle-orm/pg-core"; - -export const knoxSchema = pgSchema("knox"); +import { varchar, jsonb, timestamp, index, primaryKey } from "drizzle-orm/pg-core"; +import { knoxSchema } from "./employee"; export const title = knoxSchema.table( "title", diff --git a/db/schema/users.ts b/db/schema/users.ts index ae97da6f..bf5d41de 100644 --- a/db/schema/users.ts +++ b/db/schema/users.ts @@ -13,6 +13,7 @@ export const users = pgTable("users", { id: integer("id").primaryKey().generatedAlwaysAsIdentity(), name: varchar("name", { length: 255 }).notNull(), email: varchar("email", { length: 255 }).notNull().unique(), + deptCode: varchar("deptCode", { length: 50 }), deptName: varchar("deptName", { length: 255 }), companyId: integer("company_id") |
