CREATE TABLE "knox"."organization" (
	"company_code" varchar(10) NOT NULL,
	"department_code" varchar(50) NOT NULL,
	"company_name" varchar(100),
	"department_level" varchar(10),
	"department_name" varchar(255),
	"department_order" varchar(10),
	"en_company_name" varchar(100),
	"en_department_name" varchar(255),
	"en_manager_title" varchar(255),
	"en_sub_org_code" varchar(50),
	"in_department_code" varchar(50),
	"low_department_yn" varchar(2),
	"manager_id" varchar(50),
	"manager_name" varchar(100),
	"manager_title" varchar(255),
	"preferred_language" varchar(5),
	"sub_org_code" varchar(50),
	"sub_org_name" varchar(255),
	"upr_department_code" varchar(50),
	"en_upr_department_name" varchar(255),
	"upr_department_name" varchar(255),
	"hidden_department_yn" varchar(2),
	"corp_code" varchar(20),
	"corp_name" varchar(100),
	"en_corp_name" varchar(100),
	"raw" jsonb NOT NULL,
	"created_at" timestamp with time zone DEFAULT now() NOT NULL,
	"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
	CONSTRAINT "organization_company_code_department_code_pk" PRIMARY KEY("company_code","department_code")
);
--> statement-breakpoint
CREATE TABLE "knox"."title" (
	"company_code" varchar(10) NOT NULL,
	"title_code" varchar(20) NOT NULL,
	"title_name" varchar(100),
	"en_title_name" varchar(100),
	"sort_order" varchar(10),
	"raw" jsonb NOT NULL,
	"created_at" timestamp with time zone DEFAULT now() NOT NULL,
	"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
	CONSTRAINT "title_company_code_title_code_pk" PRIMARY KEY("company_code","title_code")
);
--> statement-breakpoint
CREATE INDEX "knox_org_company_idx" ON "knox"."organization" USING btree ("company_code");--> statement-breakpoint
CREATE INDEX "knox_title_company_idx" ON "knox"."title" USING btree ("company_code");