edit file migrate
This commit is contained in:
parent
0fbb5b928e
commit
f77c8467d6
60 changed files with 137 additions and 13701 deletions
72
.github/workflows/release.yaml
vendored
72
.github/workflows/release.yaml
vendored
|
|
@ -67,40 +67,40 @@ jobs:
|
|||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
# - name: Notify Discord Success
|
||||
# if: success()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "✅ Deployment Success!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
# "color": 3066993,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/success-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
# - name: Notify Discord Failure
|
||||
# if: failure()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "❌ Deployment Failed!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
# "color": 15158332,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/failure-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
|
|
@ -20,88 +20,88 @@ import * as fs from "fs";
|
|||
import * as path from "path";
|
||||
const { createConnection } = require("typeorm");
|
||||
import csvParser from "csv-parser";
|
||||
import { HR_PERSONAL_OFFICER_FAMILY } from "../entities/HR_PERSONAL_OFFICER_FAMILY";
|
||||
import { HR_PERSONAL_OFFICER_FAMILY } from "../entities/mis/HR_PERSONAL_OFFICER_FAMILY";
|
||||
|
||||
const BATCH_SIZE = 1000;
|
||||
// import { EducationMis } from "../entities/EducationMis";
|
||||
import { EducationMis } from "../entities/EducationMis";
|
||||
import { ProvinceImport } from "../entities/ProvinceImport";
|
||||
import { AmphurImport } from "../entities/AmphurImport";
|
||||
import { SubDistrictImport } from "../entities/SubDistrictImport";
|
||||
import { EducationMis } from "../entities/mis/EducationMis";
|
||||
import { ProvinceImport } from "../entities/mis/ProvinceImport";
|
||||
import { AmphurImport } from "../entities/mis/AmphurImport";
|
||||
import { SubDistrictImport } from "../entities/mis/SubDistrictImport";
|
||||
import { Province } from "../entities/Province";
|
||||
import { District } from "../entities/District";
|
||||
import { SubDistrict } from "../entities/SubDistrict";
|
||||
import { HR_EDUCATION } from "../entities/HR_EDUCATION";
|
||||
import { HR_PERSONAL_OFFICER_ADDRESS } from "../entities/HR_PERSONAL_OFFICER_ADDRESS";
|
||||
import { HR_EDUCATION_EMP } from "../entities/HR_EDUCATION_EMP";
|
||||
import { HR_PERSONAL_EMP_ADDRESS } from "../entities/HR_PERSONAL_EMP_ADDRESS";
|
||||
import { HR_PERSONAL_EMP_FAMILY } from "../entities/HR_PERSONAL_EMP_FAMILY";
|
||||
import { HR_EDUCATION } from "../entities/mis/HR_EDUCATION";
|
||||
import { HR_PERSONAL_OFFICER_ADDRESS } from "../entities/mis/HR_PERSONAL_OFFICER_ADDRESS";
|
||||
import { HR_EDUCATION_EMP } from "../entities/mis/HR_EDUCATION_EMP";
|
||||
import { HR_PERSONAL_EMP_ADDRESS } from "../entities/mis/HR_PERSONAL_EMP_ADDRESS";
|
||||
import { HR_PERSONAL_EMP_FAMILY } from "../entities/mis/HR_PERSONAL_EMP_FAMILY";
|
||||
import { OrgRoot } from "../entities/OrgRoot";
|
||||
import { OrgChild1 } from "../entities/OrgChild1";
|
||||
import { OrgChild2 } from "../entities/OrgChild2";
|
||||
import { OrgChild3 } from "../entities/OrgChild3";
|
||||
import { OrgChild4 } from "../entities/OrgChild4";
|
||||
import { IMPORT_ORG } from "../entities/IMPORT_ORG";
|
||||
import { IMPORT_ORG } from "../entities/mis/IMPORT_ORG";
|
||||
import { OrgRevision } from "../entities/OrgRevision";
|
||||
import { OFFICER } from "../entities/OFFICER";
|
||||
import { OFFICER } from "../entities/mis/OFFICER";
|
||||
import { Position } from "../entities/Position";
|
||||
import { PosMaster } from "../entities/PosMaster";
|
||||
import { positionOfficer } from "../entities/positionOfficer";
|
||||
import { PosExecutive } from "../entities/PosExecutive";
|
||||
import { EducationLevel } from "../entities/EducationLevel";
|
||||
import { HR_FUND_COURSE_CODE } from "../entities/HR_FUND_COURSE_CODE";
|
||||
import { HR_MAJOR_CODE } from "../entities/HR_MAJOR_CODE";
|
||||
import { HR_FUND_COURSE_CODE } from "../entities/mis/HR_FUND_COURSE_CODE";
|
||||
import { HR_MAJOR_CODE } from "../entities/mis/HR_MAJOR_CODE";
|
||||
// import { uuidv7 } from "uuidv7";
|
||||
import { ProfileSalaries } from "../entities/ProfileSalaries";
|
||||
import { HR_POSITION_OFFICER } from "../entities/HR_POSITION_OFFICER";
|
||||
import { EMPLOYEE } from "../entities/EMPLOYEE";
|
||||
import { ProfileSalaries } from "../entities/mis/ProfileSalaries";
|
||||
import { HR_POSITION_OFFICER } from "../entities/mis/HR_POSITION_OFFICER";
|
||||
import { EMPLOYEE } from "../entities/mis/EMPLOYEE";
|
||||
import { EmployeePosLevel } from "../entities/EmployeePosLevel";
|
||||
import { EmployeePosType } from "../entities/EmployeePosType";
|
||||
import { EmployeePosMaster } from "../entities/EmployeePosMaster";
|
||||
import { EmployeePosition } from "../entities/EmployeePosition";
|
||||
import { HR_POSITION_EMPLOYEE } from "../entities/HR_POSITION_EMPLOYEE";
|
||||
import { HR_POSITION_EMPLOYEE } from "../entities/mis/HR_POSITION_EMPLOYEE";
|
||||
import { ProfileDiscipline } from "../entities/ProfileDiscipline";
|
||||
import { ProfileInsignia } from "../entities/ProfileInsignia";
|
||||
import { HR_DISCIPLINE_EMP } from "../entities/HR_DISCIPLINE_EMP";
|
||||
import { HR_DISCIPLINE } from "../entities/HR_DISCIPLINE";
|
||||
import { HR_INSIGNIA } from "../entities/HR_INSIGNIA";
|
||||
import { HR_INSIGNIA_EMP } from "../entities/HR_INSIGNIA_EMP";
|
||||
import { HR_DISCIPLINE_EMP } from "../entities/mis/HR_DISCIPLINE_EMP";
|
||||
import { HR_DISCIPLINE } from "../entities/mis/HR_DISCIPLINE";
|
||||
import { HR_INSIGNIA } from "../entities/mis/HR_INSIGNIA";
|
||||
import { HR_INSIGNIA_EMP } from "../entities/mis/HR_INSIGNIA_EMP";
|
||||
import { Insignia } from "../entities/Insignia";
|
||||
import { ProfileChildren } from "../entities/ProfileChildren";
|
||||
import { ProfileChangeName } from "../entities/ProfileChangeName";
|
||||
import { HR_CHILDEN } from "../entities/HR_CHILDEN";
|
||||
import { HR_CHILDEN_EMP } from "../entities/HR_CHILDEN_EMP";
|
||||
import { HR_CHANGENAME } from "../entities/HR_CHANGENAME";
|
||||
import { HR_CHANGENAME_EMP } from "../entities/HR_CHANGENAME_EMP";
|
||||
import { HR_CHILDEN } from "../entities/mis/HR_CHILDEN";
|
||||
import { HR_CHILDEN_EMP } from "../entities/mis/HR_CHILDEN_EMP";
|
||||
import { HR_CHANGENAME } from "../entities/mis/HR_CHANGENAME";
|
||||
import { HR_CHANGENAME_EMP } from "../entities/mis/HR_CHANGENAME_EMP";
|
||||
import { ProfileHonor } from "../entities/ProfileHonor";
|
||||
import { ProfileAbility } from "../entities/ProfileAbility";
|
||||
import { ProfileDuty } from "../entities/ProfileDuty";
|
||||
import { ProfileNopaid } from "../entities/ProfileNopaid";
|
||||
import { ProfileOther } from "../entities/ProfileOther";
|
||||
import { ProfileCertificate } from "../entities/ProfileCertificate";
|
||||
import { ProfileAbilitys } from "../entities/ProfileAbilitys";
|
||||
import { ProfileCertificates } from "../entities/ProfileCertificates";
|
||||
import { ProfileDutys } from "../entities/ProfileDutys";
|
||||
import { ProfileHonors } from "../entities/ProfileHonors";
|
||||
import { ProfileNopaids } from "../entities/ProfileNopaids";
|
||||
import { ProfileOthers } from "../entities/ProfileOthers";
|
||||
import { ProfileDisciplines } from "../entities/ProfileDisciplines";
|
||||
import { ProfileChangeNames } from "../entities/ProfileChangeNames";
|
||||
import { ProfileChildrens } from "../entities/ProfileChildrens";
|
||||
import { ProfileEducations } from "../entities/ProfileEducations";
|
||||
import { ProfileInsignias } from "../entities/ProfileInsignias";
|
||||
import { ProfileAbilitys } from "../entities/mis/ProfileAbilitys";
|
||||
import { ProfileCertificates } from "../entities/mis/ProfileCertificates";
|
||||
import { ProfileDutys } from "../entities/mis/ProfileDutys";
|
||||
import { ProfileHonors } from "../entities/mis/ProfileHonors";
|
||||
import { ProfileNopaids } from "../entities/mis/ProfileNopaids";
|
||||
import { ProfileOthers } from "../entities/mis/ProfileOthers";
|
||||
import { ProfileDisciplines } from "../entities/mis/ProfileDisciplines";
|
||||
import { ProfileChangeNames } from "../entities/mis/ProfileChangeNames";
|
||||
import { ProfileChildrens } from "../entities/mis/ProfileChildrens";
|
||||
import { ProfileEducations } from "../entities/mis/ProfileEducations";
|
||||
import { ProfileInsignias } from "../entities/mis/ProfileInsignias";
|
||||
import { ProfileLeave } from "../entities/ProfileLeave";
|
||||
import { ProfileLeaves } from "../entities/ProfileLeaves";
|
||||
import { ProfileLeaves } from "../entities/mis/ProfileLeaves";
|
||||
import { ProfileSalaryTemp } from "../entities/ProfileSalaryTemp";
|
||||
import { ProfileTraining } from "../entities/ProfileTraining";
|
||||
import { ProfileTrainings } from "../entities/ProfileTrainings";
|
||||
import { EMPLOYEETEMP } from "../entities/EMPLOYEETEMP";
|
||||
import { HR_CHANGENAME_EMPTEMP } from "../entities/HR_CHANGENAME_EMPTEMP";
|
||||
import { HR_DISCIPLINE_EMPTEMP } from "../entities/HR_DISCIPLINE_EMPTEMP";
|
||||
import { HR_EDUCATION_EMPTEMP } from "../entities/HR_EDUCATION_EMPTEMP";
|
||||
import { HR_PERSONAL_EMPTEMP_ADDRESS } from "../entities/HR_PERSONAL_EMPTEMP_ADDRESS";
|
||||
import { HR_PERSONAL_EMPTEMP_FAMILY } from "../entities/HR_PERSONAL_EMPTEMP_FAMILY";
|
||||
import { HR_POSITION_EMPLOYEETEMP } from "../entities/HR_POSITION_EMPLOYEETEMP";
|
||||
import { ProfileTrainings } from "../entities/mis/ProfileTrainings";
|
||||
import { EMPLOYEETEMP } from "../entities/mis/EMPLOYEETEMP";
|
||||
import { HR_CHANGENAME_EMPTEMP } from "../entities/mis/HR_CHANGENAME_EMPTEMP";
|
||||
import { HR_DISCIPLINE_EMPTEMP } from "../entities/mis/HR_DISCIPLINE_EMPTEMP";
|
||||
import { HR_EDUCATION_EMPTEMP } from "../entities/mis/HR_EDUCATION_EMPTEMP";
|
||||
import { HR_PERSONAL_EMPTEMP_ADDRESS } from "../entities/mis/HR_PERSONAL_EMPTEMP_ADDRESS";
|
||||
import { HR_PERSONAL_EMPTEMP_FAMILY } from "../entities/mis/HR_PERSONAL_EMPTEMP_FAMILY";
|
||||
import { HR_POSITION_EMPLOYEETEMP } from "../entities/mis/HR_POSITION_EMPLOYEETEMP";
|
||||
import { positionOfficer } from "../entities/mis/positionOfficer";
|
||||
@Route("api/v1/org/upload")
|
||||
@Tags("UPLOAD")
|
||||
@Security("bearerAuth")
|
||||
|
|
|
|||
|
|
@ -47,9 +47,7 @@ export const AppDataSource = new DataSource({
|
|||
logging: true,
|
||||
// timezone: "Z",
|
||||
entities:
|
||||
process.env.NODE_ENV !== "production"
|
||||
? ["src/entities/**/*.ts"]
|
||||
: ["dist/entities/**/*{.ts,.js}"],
|
||||
process.env.NODE_ENV !== "production" ? ["src/entities/*.ts"] : ["dist/entities/*{.ts,.js}"],
|
||||
migrations:
|
||||
process.env.NODE_ENV !== "production"
|
||||
? ["src/migration/**/*.ts"]
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ export class ProfileAbility extends EntityBase {
|
|||
profileEmployeeId: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "ข้อมูลจาก Entry",
|
||||
default: false,
|
||||
})
|
||||
isEntry: boolean;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("amphurImport")
|
||||
export class AmphurImport extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("educationMis")
|
||||
export class EducationMis extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileAbilitys")
|
||||
export class ProfileAbilitys extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileCertificates")
|
||||
export class ProfileCertificates extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileChangeNames")
|
||||
export class ProfileChangeNames extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Column, Entity } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileChildrens")
|
||||
export class ProfileChildrens extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileDisciplines")
|
||||
export class ProfileDisciplines extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileDutys")
|
||||
export class ProfileDutys extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileEducations")
|
||||
export class ProfileEducations extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileHonors")
|
||||
export class ProfileHonors extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileInsignias")
|
||||
export class ProfileInsignias extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileLeaveSummary")
|
||||
export class ProfileLeaves extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileNopaids")
|
||||
export class ProfileNopaids extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileOthers")
|
||||
export class ProfileOthers extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column, Double } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileSalaries")
|
||||
export class ProfileSalaries extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("ProfileTrainings")
|
||||
export class ProfileTrainings extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("provinceImport")
|
||||
export class ProvinceImport extends EntityBase {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EntityBase } from "../base/Base";
|
||||
|
||||
@Entity("subDistrictImport")
|
||||
export class SubDistrictImport extends EntityBase {
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
34
src/migration/1754401420685-update210720261141.ts
Normal file
34
src/migration/1754401420685-update210720261141.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class Update2107202611411754401420685 implements MigrationInterface {
|
||||
name = 'Update2107202611411754401420685'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`posNo\` varchar(255) NULL COMMENT 'เลขที่ตำแหน่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`birthDateOld\` datetime NULL COMMENT 'วันเกิดเดิม โดยจะบันทึกเมื่อมีการแก้ไขข้อมูลส่วนตัว'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`birthDateOld\` datetime NULL COMMENT 'วันเกิดเดิม โดยจะบันทึกเมื่อมีการแก้ไขข้อมูลส่วนตัว'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileTraining\` CHANGE \`isEntry\` \`isEntry\` tinyint NOT NULL COMMENT 'ข้อมูลจาก Entry' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaStateOperator\` CHANGE \`createdFullName\` \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'System Administrator'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaStateOperator\` CHANGE \`lastUpdateFullName\` \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'System Administrator'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaWorkflow\` CHANGE \`createdFullName\` \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'System Administrator'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaWorkflow\` CHANGE \`lastUpdateFullName\` \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'System Administrator'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaState\` CHANGE \`createdFullName\` \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'System Administrator'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaState\` CHANGE \`lastUpdateFullName\` \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'System Administrator'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD CONSTRAINT \`FK_f1ded3e1f83ab2437f739a14f38\` FOREIGN KEY (\`profileSalaryId\`) REFERENCES \`profileSalary\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP FOREIGN KEY \`FK_f1ded3e1f83ab2437f739a14f38\``);
|
||||
await queryRunner.query(`ALTER TABLE \`metaState\` CHANGE \`lastUpdateFullName\` \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaState\` CHANGE \`createdFullName\` \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaWorkflow\` CHANGE \`lastUpdateFullName\` \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaWorkflow\` CHANGE \`createdFullName\` \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaStateOperator\` CHANGE \`lastUpdateFullName\` \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string'`);
|
||||
await queryRunner.query(`ALTER TABLE \`metaStateOperator\` CHANGE \`createdFullName\` \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileTraining\` CHANGE \`isEntry\` \`isEntry\` tinyint NOT NULL DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`birthDateOld\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`birthDateOld\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`posNo\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue