Compare commits
7 commits
dev
...
command-or
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bb1faeb2d | ||
|
|
db3c187897 | ||
|
|
2b34d3f4ce | ||
|
|
2267d1236a | ||
|
|
5bb6cfbee8 | ||
|
|
ff711c38df | ||
|
|
f5558747d8 |
485 changed files with 26800 additions and 2400382 deletions
75
.github/workflows/release_Retirement-oracle.yaml
vendored
Normal file
75
.github/workflows/release_Retirement-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-retirement-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-retirement
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_retirement.yaml --input IMAGE_VER=retirement-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Retirement.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_command-oracle.yaml
vendored
Normal file
75
.github/workflows/release_command-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-command-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-command
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_command.yaml --input IMAGE_VER=command-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Command.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_discipline-oracle.yaml
vendored
Normal file
75
.github/workflows/release_discipline-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-discipline-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-discipline
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_discipline.yaml --input IMAGE_VER=discipline-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Discipline.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_insignia-oracle.yaml
vendored
Normal file
75
.github/workflows/release_insignia-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-insignia-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-insignia
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_insignia.yaml --input IMAGE_VER=insignia-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Insignia.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_leave-oracle.yaml
vendored
Normal file
75
.github/workflows/release_leave-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-leave-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-leave
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_leave.yaml --input IMAGE_VER=leave-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Leave.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_orgEmployee-oracle.yaml
vendored
Normal file
75
.github/workflows/release_orgEmployee-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-org-employee-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-org-employee
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_orgEmployee.yaml --input IMAGE_VER=orgEmployee-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.OrganizationEmployee.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_placement-oracle.yaml
vendored
Normal file
75
.github/workflows/release_placement-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-placement-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-placement
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_placement.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Placement.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
75
.github/workflows/release_report-oracle.yaml
vendored
Normal file
75
.github/workflows/release_report-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-report-v2-service
|
||||||
|
DEPLOY_HOST: frappet.com
|
||||||
|
DEPLOY_PORT: 10102
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_report.yaml --input IMAGE_VER=report-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.Report.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
74
.github/workflows/release_reportV2-oracle.yaml
vendored
Normal file
74
.github/workflows/release_reportV2-oracle.yaml
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
name: release-dev
|
||||||
|
run-name: release-dev ${{ github.actor }}
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# tags:
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - '2.*'
|
||||||
|
# Allow run workflow manually from Action tab
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.frappet.com
|
||||||
|
IMAGE_NAME: ehr/oracle/bma-ehr-report-v2-service
|
||||||
|
DEPLOY_HOST: 192.168.1.80
|
||||||
|
COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||||
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# act workflow_dispatch -W .github/workflows/release_reportV2.yaml --input IMAGE_VER=test-v6.1 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
|
release-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# skip Set up QEMU because it fail on act and container
|
||||||
|
- name: Gen Version
|
||||||
|
id: gen_ver
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
|
else
|
||||||
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
fi
|
||||||
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
|
IMAGE_VER='test-vBeta'
|
||||||
|
fi
|
||||||
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
|
- name: Test Version
|
||||||
|
run: |
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login in to registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{env.REGISTRY}}
|
||||||
|
username: ${{secrets.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
|
- name: Build and load local docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: BMA.EHR.ReportV2.Service/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Success✅✅✅
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
|
message: |
|
||||||
|
-Failure❌❌❌
|
||||||
|
Image: ${{env.IMAGE_NAME}}
|
||||||
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
|
@ -14,7 +14,8 @@
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
||||||
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
//"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||||
|
"DefaultConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||||
},
|
},
|
||||||
"Jwt": {
|
"Jwt": {
|
||||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
<PackageReference Include="Hangfire" Version="1.8.5" />
|
<PackageReference Include="Hangfire" Version="1.8.5" />
|
||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.5" />
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.5" />
|
||||||
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
||||||
|
<PackageReference Include="Hangfire.Oracle.Core" Version="1.2.17" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,10 @@ using Serilog.Exceptions;
|
||||||
using Serilog.Sinks.Elasticsearch;
|
using Serilog.Sinks.Elasticsearch;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Transactions;
|
using System.Data;
|
||||||
using BMA.EHR.Discipline.Service.Filters;
|
using BMA.EHR.Discipline.Service.Filters;
|
||||||
using BMA.EHR.Application.Repositories;
|
using BMA.EHR.Application.Repositories;
|
||||||
|
using Hangfire.Oracle.Core;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
{
|
{
|
||||||
|
|
@ -101,17 +102,18 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
// Register DbContext
|
// Register DbContext
|
||||||
var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection");
|
var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||||
builder.Services.AddDbContext<DisciplineDbContext>(options =>
|
builder.Services.AddDbContext<DisciplineDbContext>(options =>
|
||||||
options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection)));
|
options.UseOracle(defaultConnection, o => o.MigrationsHistoryTable("__DisciplineMigrationsHistory")));
|
||||||
builder.Services.AddHealthChecks();
|
builder.Services.AddHealthChecks();
|
||||||
|
|
||||||
// Add Hangfire services.
|
// Add Hangfire services.
|
||||||
builder.Services.AddHangfire(configuration => configuration
|
builder.Services.AddHangfire(configuration => configuration
|
||||||
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
|
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
|
||||||
.UseSimpleAssemblyNameTypeSerializer()
|
.UseSimpleAssemblyNameTypeSerializer()
|
||||||
.UseRecommendedSerializerSettings()
|
.UseRecommendedSerializerSettings()
|
||||||
.UseStorage(
|
.UseStorage(
|
||||||
new MySqlStorage(
|
new OracleStorage(
|
||||||
defaultConnection,
|
defaultConnection,
|
||||||
new MySqlStorageOptions
|
new OracleStorageOptions
|
||||||
{
|
{
|
||||||
TransactionIsolationLevel = IsolationLevel.ReadCommitted,
|
TransactionIsolationLevel = IsolationLevel.ReadCommitted,
|
||||||
QueuePollInterval = TimeSpan.FromSeconds(15),
|
QueuePollInterval = TimeSpan.FromSeconds(15),
|
||||||
|
|
@ -121,7 +123,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
DashboardJobListLimit = 50000,
|
DashboardJobListLimit = 50000,
|
||||||
TransactionTimeout = TimeSpan.FromMinutes(1),
|
TransactionTimeout = TimeSpan.FromMinutes(1),
|
||||||
InvisibilityTimeout = TimeSpan.FromHours(3),
|
InvisibilityTimeout = TimeSpan.FromHours(3),
|
||||||
TablesPrefix = "Hangfire"
|
SchemaName = "SYS"
|
||||||
})));
|
})));
|
||||||
builder.Services.AddHangfireServer();
|
builder.Services.AddHangfireServer();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,15 @@
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
||||||
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
//"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||||
"ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_exam_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
//"ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_exam_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||||
"LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_leave_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
//"LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_leave_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||||
"DisciplineConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_discipline_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
//"DisciplineConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_discipline_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||||
|
|
||||||
|
"DefaultConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||||
|
"ExamConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||||
|
"LeaveConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||||
|
"DisciplineConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE"
|
||||||
},
|
},
|
||||||
"Jwt": {
|
"Jwt": {
|
||||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||||
|
|
|
||||||
|
|
@ -15,18 +15,18 @@ namespace BMA.EHR.Domain.Models.Base
|
||||||
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
[Column(Order = 101), Comment("User Id ที่สร้างข้อมูล"), MaxLength(40)]
|
[Column(Order = 101), Comment("User Id ที่สร้างข้อมูล"), MaxLength(40)]
|
||||||
public string CreatedUserId { get; set; } = string.Empty;
|
public string? CreatedUserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(Order = 102), Comment("แก้ไขข้อมูลล่าสุดเมื่อ")]
|
[Column(Order = 102), Comment("แก้ไขข้อมูลล่าสุดเมื่อ")]
|
||||||
public DateTime? LastUpdatedAt { get; set; }
|
public DateTime? LastUpdatedAt { get; set; }
|
||||||
|
|
||||||
[Column(Order = 103), Comment("User Id ที่แก้ไขข้อมูลล่าสุด"), MaxLength(40)]
|
[Column(Order = 103), Comment("User Id ที่แก้ไขข้อมูลล่าสุด"), MaxLength(40)]
|
||||||
public string LastUpdateUserId { get; set; } = string.Empty;
|
public string? LastUpdateUserId { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(Order = 104), Comment("ชื่อ User ที่สร้างข้อมูล"), MaxLength(200)]
|
[Column(Order = 104), Comment("ชื่อ User ที่สร้างข้อมูล"), MaxLength(200)]
|
||||||
public string CreatedFullName { get; set; } = string.Empty;
|
public string? CreatedFullName { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(Order = 105), Comment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), MaxLength(200)]
|
[Column(Order = 105), Comment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), MaxLength(200)]
|
||||||
public string LastUpdateFullName { get; set; } = string.Empty;
|
public string? LastUpdateFullName { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ namespace BMA.EHR.Domain.Models.Commands.Core
|
||||||
[MaxLength(100), Required, Comment("นามสกุล")]
|
[MaxLength(100), Required, Comment("นามสกุล")]
|
||||||
public string LastName { get; set; } = string.Empty;
|
public string LastName { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(TypeName = "text"), Comment("หมายเหตุ")]
|
[Column(TypeName = "NCLOB"), Comment("หมายเหตุ")]
|
||||||
public string Comment { get; set; } = string.Empty;
|
public string Comment { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(TypeName = "text"), Comment("หมายเหตุแนวนอน")]
|
[Column(TypeName = "NCLOB"), Comment("หมายเหตุแนวนอน")]
|
||||||
public string Comment2 { get; set; } = string.Empty;
|
public string Comment2 { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ")]
|
[Comment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ")]
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
||||||
public string RespondentType { get; set; } = string.Empty;
|
public string RespondentType { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
|
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string? Description { get; set; } = string.Empty;
|
public string? Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Required, Comment("สถานะอุทธรณ์/ร้องทุกข์")]
|
[Required, Comment("สถานะอุทธรณ์/ร้องทุกข์")]
|
||||||
public string Status { get; set; } = string.Empty;
|
public string Status { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("เรื่องที่อุทธรณ์/ร้องทุกข์"), Column(TypeName = "text")]
|
[Comment("เรื่องที่อุทธรณ์/ร้องทุกข์"), Column(TypeName = "NCLOB")]
|
||||||
public string? Title { get; set; } = string.Empty;
|
public string? Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"), Column(TypeName = "text")]
|
[Comment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"), Column(TypeName = "NCLOB")]
|
||||||
public string? Description { get; set; } = string.Empty;
|
public string? Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required, Comment("ประเภทอุทธรณ์หรือร้องทุกข์")]
|
[Required, Comment("ประเภทอุทธรณ์หรือร้องทุกข์")]
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
||||||
public string RespondentType { get; set; } = string.Empty;
|
public string RespondentType { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
|
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string? Description { get; set; } = string.Empty;
|
public string? Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
||||||
public string RespondentType { get; set; } = string.Empty;
|
public string RespondentType { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
|
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string? Description { get; set; } = string.Empty;
|
public string? Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Comment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน")]
|
[Comment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน")]
|
||||||
public DateTime? EndDateSuspend { get; set; }
|
public DateTime? EndDateSuspend { get; set; }
|
||||||
|
|
||||||
[Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
[Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||||
public string? Title { get; set; } = string.Empty;
|
public string? Title { get; set; } = string.Empty;
|
||||||
[Comment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)")]
|
[Comment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)")]
|
||||||
public string? OffenseDetails { get; set; } = string.Empty;
|
public string? OffenseDetails { get; set; } = string.Empty;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace BMA.EHR.Domain.Models.Discipline
|
||||||
[Required, MaxLength(128)]
|
[Required, MaxLength(128)]
|
||||||
public string FileType { get; set; } = string.Empty;
|
public string FileType { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(TypeName = "text")]
|
[Column(TypeName = "NCLOB")]
|
||||||
public string Detail { get; set; } = string.Empty;
|
public string Detail { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace BMA.EHR.Domain.Models.Documents
|
||||||
[Required, MaxLength(128)]
|
[Required, MaxLength(128)]
|
||||||
public string FileType { get; set; } = string.Empty;
|
public string FileType { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column(TypeName = "text")]
|
[Column(TypeName = "NCLOB")]
|
||||||
public string Detail { get; set; } = string.Empty;
|
public string Detail { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
// public int Order { get; set; }
|
// public int Order { get; set; }
|
||||||
[Comment("ระดับความผิด")]
|
[Comment("ระดับความผิด")]
|
||||||
public string? Level { get; set; }
|
public string? Level { get; set; }
|
||||||
[Column(TypeName = "text")]
|
[Column(TypeName = "NCLOB")]
|
||||||
[Comment("รายละเอียด")]
|
[Comment("รายละเอียด")]
|
||||||
public string? Detail { get; set; }
|
public string? Detail { get; set; }
|
||||||
[Comment("เอกสารอ้างอิง (เลขที่คำสั่ง)")]
|
[Comment("เอกสารอ้างอิง (เลขที่คำสั่ง)")]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
{
|
{
|
||||||
[Comment("ระดับความผิด")]
|
[Comment("ระดับความผิด")]
|
||||||
public string? Level { get; set; }
|
public string? Level { get; set; }
|
||||||
[Column(TypeName = "text")]
|
[Column(TypeName = "NCLOB")]
|
||||||
[Comment("รายละเอียด")]
|
[Comment("รายละเอียด")]
|
||||||
public string? Detail { get; set; }
|
public string? Detail { get; set; }
|
||||||
[Comment("เอกสารอ้างอิง (เลขที่คำสั่ง)")]
|
[Comment("เอกสารอ้างอิง (เลขที่คำสั่ง)")]
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ namespace BMA.EHR.Domain.Models.Insignias
|
||||||
[Required, MaxLength(50)]
|
[Required, MaxLength(50)]
|
||||||
public string RequestStatus { get; set; }
|
public string RequestStatus { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "text")]
|
[Column(TypeName = "NCLOB")]
|
||||||
public string RequestNote { get; set; }
|
public string RequestNote { get; set; }
|
||||||
|
|
||||||
public InsigniaPeriod Period { get; set; }
|
public InsigniaPeriod Period { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ namespace BMA.EHR.Domain.Models.Insignias
|
||||||
// [MaxLength(50)]
|
// [MaxLength(50)]
|
||||||
// public string? DocumentStatus { get; set; }
|
// public string? DocumentStatus { get; set; }
|
||||||
|
|
||||||
// [Column(TypeName = "text")]
|
// [Column(TypeName = "NCLOB")]
|
||||||
// public string? Note { get; set; }
|
// public string? Note { get; set; }
|
||||||
|
|
||||||
// [MaxLength(50)]
|
// [MaxLength(50)]
|
||||||
// public string? Special { get; set; }
|
// public string? Special { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "text"), Comment("รายละเอียดเครื่องราชฯที่ขอ")]
|
[Column(TypeName = "NCLOB"), Comment("รายละเอียดเครื่องราชฯที่ขอ")]
|
||||||
public string? MatchingConditions { get; set; }
|
public string? MatchingConditions { get; set; }
|
||||||
|
|
||||||
[Comment("สถานะตำแหน่งที่ยื่นขอ")]
|
[Comment("สถานะตำแหน่งที่ยื่นขอ")]
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ namespace BMA.EHR.Domain.Models.Notifications
|
||||||
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
||||||
public string Subject { get; set; }
|
public string Subject { get; set; }
|
||||||
|
|
||||||
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
[Required, Column(TypeName = "NCLOB"), Comment("รายละเอียดข้อความ")]
|
||||||
public string Body { get; set; }
|
public string Body { get; set; }
|
||||||
|
|
||||||
[Required, Comment("รหัสผู้รับข้อความ")]
|
[Required, Comment("รหัสผู้รับข้อความ")]
|
||||||
public Guid ReceiverUserId { get; set; }
|
public Guid ReceiverUserId { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
[Column(TypeName = "NCLOB"), Comment("สิงที่แนบมาด้วย")]
|
||||||
public string Payload { get; set; }
|
public string Payload { get; set; }
|
||||||
|
|
||||||
[Comment("เปิดอ่านแล้วหรือยัง")]
|
[Comment("เปิดอ่านแล้วหรือยัง")]
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace BMA.EHR.Domain.Models.Notifications
|
||||||
{
|
{
|
||||||
public class Notification : EntityBase
|
public class Notification : EntityBase
|
||||||
{
|
{
|
||||||
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
[Required, Column(TypeName = "NCLOB"), Comment("รายละเอียดข้อความ")]
|
||||||
public string Body { get; set; }
|
public string Body { get; set; }
|
||||||
|
|
||||||
[Required, Comment("รหัสผู้รับข้อความ")]
|
[Required, Comment("รหัสผู้รับข้อความ")]
|
||||||
|
|
@ -16,7 +16,7 @@ namespace BMA.EHR.Domain.Models.Notifications
|
||||||
[Required, Comment("ประเภทการแจ้งเตือน")]
|
[Required, Comment("ประเภทการแจ้งเตือน")]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
[Column(TypeName = "NCLOB"), Comment("สิงที่แนบมาด้วย")]
|
||||||
public string Payload { get; set; }
|
public string Payload { get; set; }
|
||||||
|
|
||||||
[Comment("เปิดอ่านแล้วหรือยัง")]
|
[Comment("เปิดอ่านแล้วหรือยัง")]
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,13 @@ namespace BMA.EHR.Domain.Models.Probation
|
||||||
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
||||||
public string Subject { get; set; }
|
public string Subject { get; set; }
|
||||||
|
|
||||||
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
[Required, Column(TypeName = "NCLOB"), Comment("รายละเอียดข้อความ")]
|
||||||
public string Body { get; set; }
|
public string Body { get; set; }
|
||||||
|
|
||||||
[Required, Comment("รหัสผู้รับข้อความ")]
|
[Required, Comment("รหัสผู้รับข้อความ")]
|
||||||
public Guid ReceiverUserId { get; set; }
|
public Guid ReceiverUserId { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
[Column(TypeName = "NCLOB"), Comment("สิงที่แนบมาด้วย")]
|
||||||
public string Payload { get; set; } = "";
|
public string Payload { get; set; } = "";
|
||||||
|
|
||||||
[Required, Comment("ส่งอีเมล์หรือไม่?")]
|
[Required, Comment("ส่งอีเมล์หรือไม่?")]
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
|
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
|
||||||
|
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.13" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ namespace BMA.EHR.Infrastructure
|
||||||
var connectionStringLeave = configuration.GetConnectionString("LeaveConnection");
|
var connectionStringLeave = configuration.GetConnectionString("LeaveConnection");
|
||||||
|
|
||||||
services.AddDbContext<LeaveDbContext>(options =>
|
services.AddDbContext<LeaveDbContext>(options =>
|
||||||
options.UseMySql(connectionStringLeave, ServerVersion.AutoDetect(connectionStringLeave),
|
options.UseOracle(connectionStringLeave,
|
||||||
b =>
|
b =>
|
||||||
{
|
{
|
||||||
b.MigrationsAssembly(typeof(LeaveDbContext).Assembly.FullName);
|
b.MigrationsAssembly(typeof(LeaveDbContext).Assembly.FullName);
|
||||||
|
|
@ -41,7 +41,7 @@ namespace BMA.EHR.Infrastructure
|
||||||
var connectionStringDiscipline = configuration.GetConnectionString("DisciplineConnection");
|
var connectionStringDiscipline = configuration.GetConnectionString("DisciplineConnection");
|
||||||
|
|
||||||
services.AddDbContext<DisciplineDbContext>(options =>
|
services.AddDbContext<DisciplineDbContext>(options =>
|
||||||
options.UseMySql(connectionStringDiscipline, ServerVersion.AutoDetect(connectionStringDiscipline),
|
options.UseOracle(connectionStringDiscipline,
|
||||||
b =>
|
b =>
|
||||||
{
|
{
|
||||||
b.MigrationsAssembly(typeof(DisciplineDbContext).Assembly.FullName);
|
b.MigrationsAssembly(typeof(DisciplineDbContext).Assembly.FullName);
|
||||||
|
|
@ -64,7 +64,7 @@ namespace BMA.EHR.Infrastructure
|
||||||
var connectionString = configuration.GetConnectionString("DefaultConnection");
|
var connectionString = configuration.GetConnectionString("DefaultConnection");
|
||||||
|
|
||||||
services.AddDbContext<ApplicationDBContext>(options =>
|
services.AddDbContext<ApplicationDBContext>(options =>
|
||||||
options.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString),
|
options.UseOracle(connectionString,
|
||||||
b =>
|
b =>
|
||||||
{
|
{
|
||||||
b.MigrationsAssembly(typeof(ApplicationDBContext).Assembly.FullName);
|
b.MigrationsAssembly(typeof(ApplicationDBContext).Assembly.FullName);
|
||||||
|
|
@ -78,7 +78,7 @@ namespace BMA.EHR.Infrastructure
|
||||||
var connectionStringExam = configuration.GetConnectionString("ExamConnection");
|
var connectionStringExam = configuration.GetConnectionString("ExamConnection");
|
||||||
|
|
||||||
services.AddDbContext<ApplicationDBExamContext>(options =>
|
services.AddDbContext<ApplicationDBExamContext>(options =>
|
||||||
options.UseMySql(connectionStringExam, ServerVersion.AutoDetect(connectionStringExam),
|
options.UseOracle(connectionStringExam,
|
||||||
b =>
|
b =>
|
||||||
{
|
{
|
||||||
b.MigrationsAssembly(typeof(ApplicationDBExamContext).Assembly.FullName);
|
b.MigrationsAssembly(typeof(ApplicationDBExamContext).Assembly.FullName);
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
using BMA.EHR.Infrastructure.Persistence;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ApplicationDBContext))]
|
|
||||||
[Migration("20230626063110_Init MetaData Table")]
|
|
||||||
partial class InitMetaDataTable
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "7.0.8")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class InitMetaDataTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterDatabase()
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,22 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddExistDbtoProject : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,46 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddDeploymentChannel : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DeploymentChannels",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsSendInbox = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
IsSendEmail = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_DeploymentChannels", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DeploymentChannels");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,22 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class testaddmigrationfromcli : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,580 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class addtableplacements : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementIsProperties",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อคุณสมบัติ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementIsProperties", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Placements",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "รอบการสอบ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Round = table.Column<string>(type: "longtext", nullable: false, comment: "ครั้งที่")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Year = table.Column<int>(type: "int", maxLength: 5, nullable: false, comment: "ปีงบประมาณ"),
|
|
||||||
Number = table.Column<int>(type: "int", maxLength: 10, nullable: false, comment: "จำนวนผู้สอบได้"),
|
|
||||||
TypeExam = table.Column<string>(type: "longtext", nullable: false, comment: "ประเภทการสอบ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วันที่เริ่มบัญชีบัญชี"),
|
|
||||||
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วันที่สิ้นสุดบัญชี"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Placements", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementStatuses",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อสถานะบรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementStatuses", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementProfiles",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PlacementId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PrefixId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
Firstname = table.Column<string>(type: "longtext", nullable: true, comment: "ชื่อ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Lastname = table.Column<string>(type: "longtext", nullable: true, comment: "นามสกุล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Number = table.Column<int>(type: "int", nullable: true, comment: "ลำดับที่สอบได้"),
|
|
||||||
OrganizationPositionId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
RecruitDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่บรรจุ"),
|
|
||||||
Amount = table.Column<double>(type: "double", nullable: true, comment: "เงินเดือน"),
|
|
||||||
PositionSalaryAmount = table.Column<double>(type: "double", nullable: true, comment: "เงินประจำตำแหน่ง"),
|
|
||||||
MouthSalaryAmount = table.Column<double>(type: "double", nullable: true, comment: "เงินค่าตอบแทนรายเดือน"),
|
|
||||||
SalaryClass = table.Column<string>(type: "longtext", nullable: true, comment: "ตำแหน่ง (รายละเอียด)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
SalaryRef = table.Column<string>(type: "longtext", nullable: true, comment: "เอกสารอ้างอิง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsOfficer = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "ข้าราชการฯ กทม."),
|
|
||||||
PlacementStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
RejectReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลสละสิทธิ์")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ReliefReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลผ่อนผัน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ReliefDocId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
IsProperty = table.Column<string>(type: "longtext", nullable: true, comment: "การคัดกรองคุณสมบัติ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Nationality = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "สัญชาติ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
DateOfBirth = table.Column<DateTime>(type: "datetime(6)", maxLength: 40, nullable: true, comment: "วันเกิด"),
|
|
||||||
RelationshipId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
Email = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "อีเมล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CitizenId = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "เลขประจำตัวประชาชน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CitizenDistrictId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
CitizenProvinceId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
CitizenDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ออกบัตร"),
|
|
||||||
Telephone = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "โทรศัพท์")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MobilePhone = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "โทรศัพท์มือถือ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Knowledge = table.Column<string>(type: "longtext", nullable: true, comment: "ความสามารถพิเศษ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
RegistAddress = table.Column<string>(type: "longtext", nullable: true, comment: "ที่อยู่ตามทะเบียนบ้าน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
RegistProvinceId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
RegistDistrictId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
RegistSubDistrictId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
RegistZipCode = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
RegistSame = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"),
|
|
||||||
CurrentAddress = table.Column<string>(type: "longtext", nullable: true, comment: "ที่อยู่ปัจจุบัน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CurrentProvinceId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
CurrentDistrictId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
CurrentSubDistrictId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
CurrentZipCode = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "รหัสไปรษณีย์ที่อยู่ปัจจุบัน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Marry = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "คู่สมรส"),
|
|
||||||
MarryPrefixId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
MarryFirstName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ชื่อจริงคู่สมรส")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MarryLastName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "นามสกุลคู่สมรส")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MarryOccupation = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "อาชีพคู่สมรส")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MarryNationality = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "สัญชาติคู่สมรส")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
FatherPrefixId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
FatherFirstName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ชื่อจริงบิดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
FatherLastName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "นามสกุลบิดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
FatherOccupation = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "อาชีพบิดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
FatherNationality = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "สัญชาติบิดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MotherPrefixId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
MotherFirstName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ชื่อจริงมารดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MotherLastName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "นามสกุลมารดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MotherOccupation = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "อาชีพมารดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MotherNationality = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "สัญชาติมารดา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OccupationType = table.Column<string>(type: "longtext", nullable: true, comment: "ประเภทอาชีพที่ทำงานมาก่อน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OccupationCompany = table.Column<string>(type: "longtext", nullable: true, comment: "สำนัก/บริษัท บริษัท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OccupationDepartment = table.Column<string>(type: "longtext", nullable: true, comment: "กอง/ฝ่าย บริษัท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OccupationEmail = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "อีเมล บริษัท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OccupationTelephone = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "โทรศัพท์ บริษัท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OccupationPosition = table.Column<string>(type: "longtext", nullable: true, comment: "ตำแหน่งอาชีพ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PositionNumberId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionPathId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionPathSideId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionTypeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionLineId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionLevelId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PointTotalA = table.Column<double>(type: "double", nullable: true, comment: "คะแนนเต็มภาค ก"),
|
|
||||||
PointA = table.Column<double>(type: "double", nullable: true, comment: "คะแนนภาค ก"),
|
|
||||||
PointTotalB = table.Column<double>(type: "double", nullable: true, comment: "คะแนนเต็มภาค ข"),
|
|
||||||
PointB = table.Column<double>(type: "double", nullable: true, comment: "คะแนนภาค ข"),
|
|
||||||
PointTotalC = table.Column<double>(type: "double", nullable: true, comment: "คะแนนเต็มภาค ค"),
|
|
||||||
PointC = table.Column<double>(type: "double", nullable: true, comment: "คะแนนภาค ค"),
|
|
||||||
ExamNumber = table.Column<int>(type: "int", nullable: false, comment: "ลำดับที่สอบได้"),
|
|
||||||
ExamRound = table.Column<int>(type: "int", nullable: false, comment: "จำนวนครั้งที่สมัครสอบ"),
|
|
||||||
Pass = table.Column<string>(type: "longtext", nullable: true, comment: "ผลสมัครสอบ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementProfiles", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Districts_CitizenDistrictId",
|
|
||||||
column: x => x.CitizenDistrictId,
|
|
||||||
principalTable: "Districts",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Districts_CurrentDistrictId",
|
|
||||||
column: x => x.CurrentDistrictId,
|
|
||||||
principalTable: "Districts",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Districts_RegistDistrictId",
|
|
||||||
column: x => x.RegistDistrictId,
|
|
||||||
principalTable: "Districts",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Documents_ReliefDocId",
|
|
||||||
column: x => x.ReliefDocId,
|
|
||||||
principalTable: "Documents",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_OrganizationPositions_OrganizationPosition~",
|
|
||||||
column: x => x.OrganizationPositionId,
|
|
||||||
principalTable: "OrganizationPositions",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PlacementStatuses_PlacementStatusId",
|
|
||||||
column: x => x.PlacementStatusId,
|
|
||||||
principalTable: "PlacementStatuses",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Placements_PlacementId",
|
|
||||||
column: x => x.PlacementId,
|
|
||||||
principalTable: "Placements",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionLevels_PositionLevelId",
|
|
||||||
column: x => x.PositionLevelId,
|
|
||||||
principalTable: "PositionLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionLines_PositionLineId",
|
|
||||||
column: x => x.PositionLineId,
|
|
||||||
principalTable: "PositionLines",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionNumbers_PositionNumberId",
|
|
||||||
column: x => x.PositionNumberId,
|
|
||||||
principalTable: "PositionNumbers",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionPathSides_PositionPathSideId",
|
|
||||||
column: x => x.PositionPathSideId,
|
|
||||||
principalTable: "PositionPathSides",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionPaths_PositionPathId",
|
|
||||||
column: x => x.PositionPathId,
|
|
||||||
principalTable: "PositionPaths",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionTypes_PositionTypeId",
|
|
||||||
column: x => x.PositionTypeId,
|
|
||||||
principalTable: "PositionTypes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Prefixes_FatherPrefixId",
|
|
||||||
column: x => x.FatherPrefixId,
|
|
||||||
principalTable: "Prefixes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Prefixes_MarryPrefixId",
|
|
||||||
column: x => x.MarryPrefixId,
|
|
||||||
principalTable: "Prefixes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Prefixes_MotherPrefixId",
|
|
||||||
column: x => x.MotherPrefixId,
|
|
||||||
principalTable: "Prefixes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Prefixes_PrefixId",
|
|
||||||
column: x => x.PrefixId,
|
|
||||||
principalTable: "Prefixes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Provinces_CitizenProvinceId",
|
|
||||||
column: x => x.CitizenProvinceId,
|
|
||||||
principalTable: "Provinces",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Provinces_CurrentProvinceId",
|
|
||||||
column: x => x.CurrentProvinceId,
|
|
||||||
principalTable: "Provinces",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Provinces_RegistProvinceId",
|
|
||||||
column: x => x.RegistProvinceId,
|
|
||||||
principalTable: "Provinces",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Relationships_RelationshipId",
|
|
||||||
column: x => x.RelationshipId,
|
|
||||||
principalTable: "Relationships",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_SubDistricts_CurrentSubDistrictId",
|
|
||||||
column: x => x.CurrentSubDistrictId,
|
|
||||||
principalTable: "SubDistricts",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_SubDistricts_RegistSubDistrictId",
|
|
||||||
column: x => x.RegistSubDistrictId,
|
|
||||||
principalTable: "SubDistricts",
|
|
||||||
principalColumn: "Id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementCareers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PlacementProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DurationStart = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "ระยะเวลาเริ่ม"),
|
|
||||||
DurationEnd = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "ระยะเวลาสิ้นสุด"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "สถานที่ทำงาน/ฝึกงาน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Position = table.Column<string>(type: "longtext", nullable: false, comment: "ตำแหน่ง/ลักษณะงาน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Salary = table.Column<int>(type: "int", maxLength: 20, nullable: false, comment: "เงินเดือนสุดท้ายก่อนออก"),
|
|
||||||
Reason = table.Column<string>(type: "longtext", nullable: false, comment: "เหตุผลที่ออก")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementCareers", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementCareers_PlacementProfiles_PlacementProfileId",
|
|
||||||
column: x => x.PlacementProfileId,
|
|
||||||
principalTable: "PlacementProfiles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementEducations",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PlacementProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
EducationLevelId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
Major = table.Column<string>(type: "longtext", nullable: false, comment: "สาขาวิชา/วิชาเอก")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Scores = table.Column<float>(type: "float", maxLength: 10, nullable: false, comment: "คะแนนเฉลี่ยตลอดหลักสูตร"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อสถานศึกษา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
DurationStart = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "ระยะเวลาเริ่ม"),
|
|
||||||
DurationEnd = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "ระยะเวลาสิ้นสุด")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementEducations", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementEducations_EducationLevels_EducationLevelId",
|
|
||||||
column: x => x.EducationLevelId,
|
|
||||||
principalTable: "EducationLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementEducations_PlacementProfiles_PlacementProfileId",
|
|
||||||
column: x => x.PlacementProfileId,
|
|
||||||
principalTable: "PlacementProfiles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementCareers_PlacementProfileId",
|
|
||||||
table: "PlacementCareers",
|
|
||||||
column: "PlacementProfileId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementEducations_EducationLevelId",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
column: "EducationLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementEducations_PlacementProfileId",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
column: "PlacementProfileId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_CitizenDistrictId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "CitizenDistrictId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_CitizenProvinceId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "CitizenProvinceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_CurrentDistrictId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "CurrentDistrictId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_CurrentProvinceId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "CurrentProvinceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_CurrentSubDistrictId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "CurrentSubDistrictId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_FatherPrefixId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "FatherPrefixId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_MarryPrefixId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "MarryPrefixId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_MotherPrefixId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "MotherPrefixId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_OrganizationPositionId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "OrganizationPositionId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PlacementId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PlacementId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PlacementStatusId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PlacementStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionLevelId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionLineId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionLineId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionNumberId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionNumberId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionPathId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionPathId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionPathSideId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionPathSideId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionTypeId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PrefixId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PrefixId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_RegistDistrictId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "RegistDistrictId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_RegistProvinceId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "RegistProvinceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_RegistSubDistrictId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "RegistSubDistrictId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_RelationshipId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "RelationshipId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_ReliefDocId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "ReliefDocId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementCareers");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementIsProperties");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementStatuses");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Placements");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,92 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetablePlacementaddPlacementType : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TypeExam",
|
|
||||||
table: "Placements");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PlacementTypeId",
|
|
||||||
table: "Placements",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementTypes",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อประเภทบรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementTypes", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Placements_PlacementTypeId",
|
|
||||||
table: "Placements",
|
|
||||||
column: "PlacementTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Placements_PlacementTypes_PlacementTypeId",
|
|
||||||
table: "Placements",
|
|
||||||
column: "PlacementTypeId",
|
|
||||||
principalTable: "PlacementTypes",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Placements_PlacementTypes_PlacementTypeId",
|
|
||||||
table: "Placements");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementTypes");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Placements_PlacementTypeId",
|
|
||||||
table: "Placements");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PlacementTypeId",
|
|
||||||
table: "Placements");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "TypeExam",
|
|
||||||
table: "Placements",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ประเภทการสอบ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,124 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetablePlacementaddReportingDate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PlacementStatuses_PlacementStatusId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementStatuses");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "PlacementStatusId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
newName: "GenderId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_PlacementProfiles_PlacementStatusId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
newName: "IX_PlacementProfiles_GenderId");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsRelief",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false,
|
|
||||||
comment: "ผ่อนผัน");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "PlacementStatus",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "สถานะการบรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "ReportingDate",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "วันที่รายงานตัว");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Genders_GenderId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "GenderId",
|
|
||||||
principalTable: "Genders",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Genders_GenderId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsRelief",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PlacementStatus",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ReportingDate",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "GenderId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
newName: "PlacementStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_PlacementProfiles_GenderId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
newName: "IX_PlacementProfiles_PlacementStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementStatuses",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อสถานะบรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementStatuses", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PlacementStatuses_PlacementStatusId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PlacementStatusId",
|
|
||||||
principalTable: "PlacementStatuses",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,50 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetablePlacementaddstartstatus : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
keyColumn: "PlacementStatus",
|
|
||||||
keyValue: null,
|
|
||||||
column: "PlacementStatus",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "PlacementStatus",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการบรรจุ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "สถานะการบรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "PlacementStatus",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "สถานะการบรรจุ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldComment: "สถานะการบรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,185 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetablePlacementaddcertificate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementCareers");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "BloodGroupId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Race",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(40)",
|
|
||||||
maxLength: 40,
|
|
||||||
nullable: true,
|
|
||||||
comment: "เชื้อชาติ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "ReligionId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementCertificates",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PlacementProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CertificateNo = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "เลขที่ใบอนุญาต")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Issuer = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "หน่วยงานผู้ออกใบอนุญาต")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IssueDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่ออกใบอนุญาต"),
|
|
||||||
ExpireDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่หมดอายุ"),
|
|
||||||
CertificateType = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ชื่อใบอนุญาต")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementCertificates", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementCertificates_PlacementProfiles_PlacementProfileId",
|
|
||||||
column: x => x.PlacementProfileId,
|
|
||||||
principalTable: "PlacementProfiles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_BloodGroupId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "BloodGroupId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_ReligionId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "ReligionId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementCertificates_PlacementProfileId",
|
|
||||||
table: "PlacementCertificates",
|
|
||||||
column: "PlacementProfileId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_BloodGroups_BloodGroupId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "BloodGroupId",
|
|
||||||
principalTable: "BloodGroups",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Religions_ReligionId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "ReligionId",
|
|
||||||
principalTable: "Religions",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_BloodGroups_BloodGroupId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_Religions_ReligionId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PlacementCertificates");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PlacementProfiles_BloodGroupId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PlacementProfiles_ReligionId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "BloodGroupId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Race",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ReligionId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PlacementCareers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PlacementProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DurationEnd = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "ระยะเวลาสิ้นสุด"),
|
|
||||||
DurationStart = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "ระยะเวลาเริ่ม"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false, comment: "สถานที่ทำงาน/ฝึกงาน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Position = table.Column<string>(type: "longtext", nullable: false, comment: "ตำแหน่ง/ลักษณะงาน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Reason = table.Column<string>(type: "longtext", nullable: false, comment: "เหตุผลที่ออก")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Salary = table.Column<int>(type: "int", maxLength: 20, nullable: false, comment: "เงินเดือนสุดท้ายก่อนออก")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PlacementCareers", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PlacementCareers_PlacementProfiles_PlacementProfileId",
|
|
||||||
column: x => x.PlacementProfileId,
|
|
||||||
principalTable: "PlacementProfiles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementCareers_PlacementProfileId",
|
|
||||||
table: "PlacementCareers",
|
|
||||||
column: "PlacementProfileId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,282 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetableplacementEducationaddDegree : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "DurationEnd",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "DurationStart",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Major",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Name",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Scores",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Country",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(1000)",
|
|
||||||
maxLength: 1000,
|
|
||||||
nullable: true,
|
|
||||||
comment: "ประเทศ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Degree",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(200)",
|
|
||||||
maxLength: 200,
|
|
||||||
nullable: true,
|
|
||||||
comment: "วุฒิการศึกษา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Duration",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(1000)",
|
|
||||||
maxLength: 1000,
|
|
||||||
nullable: true,
|
|
||||||
comment: "ระยะเวลา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "DurationYear",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ระยะเวลาหลักสูตร");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "EndDate",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ถึง");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Field",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(200)",
|
|
||||||
maxLength: 200,
|
|
||||||
nullable: true,
|
|
||||||
comment: "สาขาวิชา/ทาง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "FinishDate",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "วันที่สำเร็จการศึกษา");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "FundName",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(1000)",
|
|
||||||
maxLength: 1000,
|
|
||||||
nullable: true,
|
|
||||||
comment: "ทุน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Gpa",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(20)",
|
|
||||||
maxLength: 20,
|
|
||||||
nullable: true,
|
|
||||||
comment: "เกรดเฉลี่ย")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Institute",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(1000)",
|
|
||||||
maxLength: 1000,
|
|
||||||
nullable: true,
|
|
||||||
comment: "สถานศึกษา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsDate",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ประเภทช่วงเวลาการศึกษา");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsEducation",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "เป็นวุฒิศึกษาในตำแหน่ง");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Other",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "varchar(1000)",
|
|
||||||
maxLength: 1000,
|
|
||||||
nullable: true,
|
|
||||||
comment: "ข้อมูลการติดต่อ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PositionPathId",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "StartDate",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ตั้งแต่");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementEducations_PositionPathId",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
column: "PositionPathId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PlacementEducations_PositionPaths_PositionPathId",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
column: "PositionPathId",
|
|
||||||
principalTable: "PositionPaths",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PlacementEducations_PositionPaths_PositionPathId",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PlacementEducations_PositionPathId",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Country",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Degree",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Duration",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "DurationYear",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "EndDate",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Field",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "FinishDate",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "FundName",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Gpa",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Institute",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsDate",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsEducation",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Other",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PositionPathId",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "StartDate",
|
|
||||||
table: "PlacementEducations");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "DurationEnd",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
comment: "ระยะเวลาสิ้นสุด");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "DurationStart",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
comment: "ระยะเวลาเริ่ม");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Major",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สาขาวิชา/วิชาเอก")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อสถานศึกษา")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<float>(
|
|
||||||
name: "Scores",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "float",
|
|
||||||
maxLength: 10,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0f,
|
|
||||||
comment: "คะแนนเฉลี่ยตลอดหลักสูตร");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,30 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetableprofileaddkeycloakId : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "KeycloakId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "KeycloakId",
|
|
||||||
table: "Profiles");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,57 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddMessageQueue : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "MessageQueues",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
SenderSystem = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ส่งจากระบบงาน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Subject = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MessageContent = table.Column<string>(type: "longtext", nullable: false, comment: "รายละเอียดข้อความ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MessagePayLoad = table.Column<string>(type: "longtext", nullable: false, comment: "สิ่งที่แนบมาด้วย")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ReceiverUserId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสของผู้รับข้อความ", collation: "ascii_general_ci"),
|
|
||||||
IsSendEmail = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งอีเมลล์หรือไม่?"),
|
|
||||||
IsSendInbox = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งไปที่กล่องข้อความหรือไม่?"),
|
|
||||||
IsSendNotification = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งการแจ้งเตือนหรือไม่?"),
|
|
||||||
IsSend = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ทำการส่งข้อความแล้วหรือยัง?")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_MessageQueues", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "MessageQueues");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,32 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddReceiverEmailtoMessageQueue : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "ReceiverEmailAddress",
|
|
||||||
table: "MessageQueues",
|
|
||||||
type: "varchar(500)",
|
|
||||||
maxLength: 500,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
comment: "อีเมล์ของผู้รับ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ReceiverEmailAddress",
|
|
||||||
table: "MessageQueues");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,306 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddtableOrganizationEmployees : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrganizationEmployees",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Agency = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ConditionNote = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Department = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Government = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: true),
|
|
||||||
IsCondition = table.Column<bool>(type: "tinyint(1)", nullable: true),
|
|
||||||
IsDirector = table.Column<bool>(type: "tinyint(1)", nullable: true),
|
|
||||||
OrganizationUserNote = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Qualification = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Pile = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PosNo = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PositionCondition = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PositionMasterUserNote = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrganizationOrder = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrganizationFaxId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationLevelId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationOrganizationId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationTelExternalId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationTelInternalId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationTypeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionEmployeeStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionEmployeeLineId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionEmployeePositionId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationAgencyId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationGovernmentAgencyId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
OrganizationShortNameId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
ProfileId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrganizationEmployees", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationFaxs_OrganizationFaxId",
|
|
||||||
column: x => x.OrganizationFaxId,
|
|
||||||
principalTable: "OrganizationFaxs",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationLevels_OrganizationLevelId",
|
|
||||||
column: x => x.OrganizationLevelId,
|
|
||||||
principalTable: "OrganizationLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationOrganizations_Organization~",
|
|
||||||
column: x => x.OrganizationOrganizationId,
|
|
||||||
principalTable: "OrganizationOrganizations",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationShortNames_OrganizationSho~",
|
|
||||||
column: x => x.OrganizationShortNameId,
|
|
||||||
principalTable: "OrganizationShortNames",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationTelExternals_OrganizationT~",
|
|
||||||
column: x => x.OrganizationTelExternalId,
|
|
||||||
principalTable: "OrganizationTelExternals",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationTelInternals_OrganizationT~",
|
|
||||||
column: x => x.OrganizationTelInternalId,
|
|
||||||
principalTable: "OrganizationTelInternals",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_OrganizationTypes_OrganizationTypeId",
|
|
||||||
column: x => x.OrganizationTypeId,
|
|
||||||
principalTable: "OrganizationTypes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_Organizations_OrganizationAgencyId",
|
|
||||||
column: x => x.OrganizationAgencyId,
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_Organizations_OrganizationGovernmentAg~",
|
|
||||||
column: x => x.OrganizationGovernmentAgencyId,
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_PositionEmployeeLines_PositionEmployee~",
|
|
||||||
column: x => x.PositionEmployeeLineId,
|
|
||||||
principalTable: "PositionEmployeeLines",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_PositionEmployeePositions_PositionEmpl~",
|
|
||||||
column: x => x.PositionEmployeePositionId,
|
|
||||||
principalTable: "PositionEmployeePositions",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_PositionEmployeeStatuses_PositionEmplo~",
|
|
||||||
column: x => x.PositionEmployeeStatusId,
|
|
||||||
principalTable: "PositionEmployeeStatuses",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationEmployees_Profiles_ProfileId",
|
|
||||||
column: x => x.ProfileId,
|
|
||||||
principalTable: "Profiles",
|
|
||||||
principalColumn: "Id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrganizationPositionEmployeeLevels",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrganizationEmployeeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionEmployeeLevelId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrganizationPositionEmployeeLevels", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeeLevels_OrganizationEmployees_Org~",
|
|
||||||
column: x => x.OrganizationEmployeeId,
|
|
||||||
principalTable: "OrganizationEmployees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeeLevels_PositionEmployeeLevels_Po~",
|
|
||||||
column: x => x.PositionEmployeeLevelId,
|
|
||||||
principalTable: "PositionEmployeeLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrganizationPositionEmployeePositionSides",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrganizationEmployeeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PositionEmployeePositionSideId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrganizationPositionEmployeePositionSides", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeePositionSides_OrganizationEmploy~",
|
|
||||||
column: x => x.OrganizationEmployeeId,
|
|
||||||
principalTable: "OrganizationEmployees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrganizationPositionEmployeePositionSides_PositionEmployeePo~",
|
|
||||||
column: x => x.PositionEmployeePositionSideId,
|
|
||||||
principalTable: "PositionEmployeePositionSides",
|
|
||||||
principalColumn: "Id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationAgencyId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationAgencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationFaxId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationFaxId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationGovernmentAgencyId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationGovernmentAgencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationLevelId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationOrganizationId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationOrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationShortNameId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationShortNameId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationTelExternalId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationTelExternalId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationTelInternalId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationTelInternalId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_OrganizationTypeId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "OrganizationTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_PositionEmployeeLineId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "PositionEmployeeLineId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_PositionEmployeePositionId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "PositionEmployeePositionId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_PositionEmployeeStatusId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "PositionEmployeeStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationEmployees_ProfileId",
|
|
||||||
table: "OrganizationEmployees",
|
|
||||||
column: "ProfileId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeeLevels_OrganizationEmployeeId",
|
|
||||||
table: "OrganizationPositionEmployeeLevels",
|
|
||||||
column: "OrganizationEmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeeLevels_PositionEmployeeLevelId",
|
|
||||||
table: "OrganizationPositionEmployeeLevels",
|
|
||||||
column: "PositionEmployeeLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeePositionSides_OrganizationEmploy~",
|
|
||||||
table: "OrganizationPositionEmployeePositionSides",
|
|
||||||
column: "OrganizationEmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrganizationPositionEmployeePositionSides_PositionEmployeePo~",
|
|
||||||
table: "OrganizationPositionEmployeePositionSides",
|
|
||||||
column: "PositionEmployeePositionSideId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrganizationPositionEmployeeLevels");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrganizationPositionEmployeePositionSides");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrganizationEmployees");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,198 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddPlacementCommandTableandCommandCoreTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "CommandStatuses",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "สถานะของคำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_CommandStatuses", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "CommandTypes",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อคำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Category = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ประเภทคำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_CommandTypes", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "BaseCommand",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CommandNo = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, comment: "เลขที่คำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CommandYear = table.Column<string>(type: "varchar(4)", maxLength: 4, nullable: false, comment: "ปีที่ออกคำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CommandTypeId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงประเภทคำสั่ง", collation: "ascii_general_ci"),
|
|
||||||
IssuerOrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง", collation: "ascii_general_ci"),
|
|
||||||
IssuerOrganizationName = table.Column<string>(type: "longtext", nullable: false, comment: "หน่วยงานที่ออกคำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CommandStatusId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงสถานะคำสั่ง", collation: "ascii_general_ci"),
|
|
||||||
AuthorizedUserId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงผู้มีอำนาจลงนาม", collation: "ascii_general_ci"),
|
|
||||||
AuthorizedUserFullName = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อผู้มีอำนาจลงนาม")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Discriminator = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ExamRoundId = table.Column<Guid>(type: "char(36)", nullable: true, comment: "อ้างอิงรอบการสอบ", collation: "ascii_general_ci"),
|
|
||||||
PositionName = table.Column<string>(type: "longtext", nullable: true, comment: "ตำแหน่งที่บรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ConclusionRegisterNo = table.Column<string>(type: "longtext", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ConclusionRegisterDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)"),
|
|
||||||
ConclusionResultNo = table.Column<string>(type: "longtext", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ConclusionResultDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_BaseCommand", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_BaseCommand_CommandStatuses_CommandStatusId",
|
|
||||||
column: x => x.CommandStatusId,
|
|
||||||
principalTable: "CommandStatuses",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_BaseCommand_CommandTypes_CommandTypeId",
|
|
||||||
column: x => x.CommandTypeId,
|
|
||||||
principalTable: "CommandTypes",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "CommandDocuments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Category = table.Column<string>(type: "longtext", nullable: false, comment: "ประเภทเอกสาร")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CommandId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_CommandDocuments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_CommandDocuments_BaseCommand_CommandId",
|
|
||||||
column: x => x.CommandId,
|
|
||||||
principalTable: "BaseCommand",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Documents_DocumentId",
|
|
||||||
column: x => x.DocumentId,
|
|
||||||
principalTable: "Documents",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_BaseCommand_CommandStatusId",
|
|
||||||
table: "BaseCommand",
|
|
||||||
column: "CommandStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_BaseCommand_CommandTypeId",
|
|
||||||
table: "BaseCommand",
|
|
||||||
column: "CommandTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_CommandDocuments_CommandId",
|
|
||||||
table: "CommandDocuments",
|
|
||||||
column: "CommandId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_CommandDocuments_DocumentId",
|
|
||||||
table: "CommandDocuments",
|
|
||||||
column: "DocumentId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "CommandDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "BaseCommand");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "CommandStatuses");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "CommandTypes");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,136 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class ChangeBaseCommandTableName : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_BaseCommand_CommandStatuses_CommandStatusId",
|
|
||||||
table: "BaseCommand");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_BaseCommand_CommandTypes_CommandTypeId",
|
|
||||||
table: "BaseCommand");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_CommandDocuments_BaseCommand_CommandId",
|
|
||||||
table: "CommandDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_BaseCommand",
|
|
||||||
table: "BaseCommand");
|
|
||||||
|
|
||||||
migrationBuilder.RenameTable(
|
|
||||||
name: "BaseCommand",
|
|
||||||
newName: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_BaseCommand_CommandTypeId",
|
|
||||||
table: "Command",
|
|
||||||
newName: "IX_Command_CommandTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_BaseCommand_CommandStatusId",
|
|
||||||
table: "Command",
|
|
||||||
newName: "IX_Command_CommandStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Command",
|
|
||||||
table: "Command",
|
|
||||||
column: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Command_CommandStatuses_CommandStatusId",
|
|
||||||
table: "Command",
|
|
||||||
column: "CommandStatusId",
|
|
||||||
principalTable: "CommandStatuses",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Command_CommandTypes_CommandTypeId",
|
|
||||||
table: "Command",
|
|
||||||
column: "CommandTypeId",
|
|
||||||
principalTable: "CommandTypes",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Command_CommandId",
|
|
||||||
table: "CommandDocuments",
|
|
||||||
column: "CommandId",
|
|
||||||
principalTable: "Command",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Command_CommandStatuses_CommandStatusId",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Command_CommandTypes_CommandTypeId",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Command_CommandId",
|
|
||||||
table: "CommandDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Command",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.RenameTable(
|
|
||||||
name: "Command",
|
|
||||||
newName: "BaseCommand");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Command_CommandTypeId",
|
|
||||||
table: "BaseCommand",
|
|
||||||
newName: "IX_BaseCommand_CommandTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Command_CommandStatusId",
|
|
||||||
table: "BaseCommand",
|
|
||||||
newName: "IX_BaseCommand_CommandStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_BaseCommand",
|
|
||||||
table: "BaseCommand",
|
|
||||||
column: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_BaseCommand_CommandStatuses_CommandStatusId",
|
|
||||||
table: "BaseCommand",
|
|
||||||
column: "CommandStatusId",
|
|
||||||
principalTable: "CommandStatuses",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_BaseCommand_CommandTypes_CommandTypeId",
|
|
||||||
table: "BaseCommand",
|
|
||||||
column: "CommandTypeId",
|
|
||||||
principalTable: "CommandTypes",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_CommandDocuments_BaseCommand_CommandId",
|
|
||||||
table: "CommandDocuments",
|
|
||||||
column: "CommandId",
|
|
||||||
principalTable: "BaseCommand",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,191 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetablePlacementProfileadddraft : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "Draft",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ข้อมูลตำแหน่ง Draft");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "InsigniaPeriods",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Year = table.Column<int>(type: "int", nullable: false),
|
|
||||||
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
Amount = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Type = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_InsigniaPeriods", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "InsigniaRequests",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
RequestStatus = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
RequestNote = table.Column<string>(type: "text", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PeriodId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
OrganizationOrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_InsigniaRequests", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_InsigniaRequests_InsigniaPeriods_PeriodId",
|
|
||||||
column: x => x.PeriodId,
|
|
||||||
principalTable: "InsigniaPeriods",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_InsigniaRequests_OrganizationOrganizations_OrganizationOrgan~",
|
|
||||||
column: x => x.OrganizationOrganizationId,
|
|
||||||
principalTable: "OrganizationOrganizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "InsigniaRequestProfiles",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
RequestDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
Salary = table.Column<decimal>(type: "decimal(65,30)", nullable: true),
|
|
||||||
IsApprove = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
QualificationStatus = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
DocumentStatus = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Note = table.Column<string>(type: "text", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Special = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MatchingConditions = table.Column<string>(type: "text", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
RequestInsigniaId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
RequestId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_InsigniaRequestProfiles", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_InsigniaRequestProfiles_InsigniaRequests_RequestId",
|
|
||||||
column: x => x.RequestId,
|
|
||||||
principalTable: "InsigniaRequests",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_InsigniaRequestProfiles_Insignias_RequestInsigniaId",
|
|
||||||
column: x => x.RequestInsigniaId,
|
|
||||||
principalTable: "Insignias",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_InsigniaRequestProfiles_Profiles_ProfileId",
|
|
||||||
column: x => x.ProfileId,
|
|
||||||
principalTable: "Profiles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_InsigniaRequestProfiles_ProfileId",
|
|
||||||
table: "InsigniaRequestProfiles",
|
|
||||||
column: "ProfileId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_InsigniaRequestProfiles_RequestId",
|
|
||||||
table: "InsigniaRequestProfiles",
|
|
||||||
column: "RequestId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_InsigniaRequestProfiles_RequestInsigniaId",
|
|
||||||
table: "InsigniaRequestProfiles",
|
|
||||||
column: "RequestInsigniaId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_InsigniaRequests_OrganizationOrganizationId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
column: "OrganizationOrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_InsigniaRequests_PeriodId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
column: "PeriodId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "InsigniaRequestProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "InsigniaRequests");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "InsigniaPeriods");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Draft",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,50 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdatetablePlacementProfileaddpositioncandidate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PositionCandidateId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionCandidateId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionCandidateId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionPaths_PositionCandidateId",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
column: "PositionCandidateId",
|
|
||||||
principalTable: "PositionPaths",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PlacementProfiles_PositionPaths_PositionCandidateId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PlacementProfiles_PositionCandidateId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PositionCandidateId",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,314 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class ChangeCommandTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Command_CommandStatuses_CommandStatusId",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Command_CommandTypes_CommandTypeId",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Command_CommandId",
|
|
||||||
table: "CommandDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Command",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Discriminator",
|
|
||||||
table: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.RenameTable(
|
|
||||||
name: "Command",
|
|
||||||
newName: "Commands");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Command_CommandTypeId",
|
|
||||||
table: "Commands",
|
|
||||||
newName: "IX_Commands_CommandTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Command_CommandStatusId",
|
|
||||||
table: "Commands",
|
|
||||||
newName: "IX_Commands_CommandStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Commands",
|
|
||||||
keyColumn: "PositionName",
|
|
||||||
keyValue: null,
|
|
||||||
column: "PositionName",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "PositionName",
|
|
||||||
table: "Commands",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ตำแหน่งที่บรรจุ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "ตำแหน่งที่บรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "ExamRoundId",
|
|
||||||
table: "Commands",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
comment: "อ้างอิงรอบการสอบ",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "อ้างอิงรอบการสอบ")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Commands",
|
|
||||||
keyColumn: "ConclusionResultNo",
|
|
||||||
keyValue: null,
|
|
||||||
column: "ConclusionResultNo",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ConclusionResultNo",
|
|
||||||
table: "Commands",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "ConclusionResultDate",
|
|
||||||
table: "Commands",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)",
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Commands",
|
|
||||||
keyColumn: "ConclusionRegisterNo",
|
|
||||||
keyValue: null,
|
|
||||||
column: "ConclusionRegisterNo",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ConclusionRegisterNo",
|
|
||||||
table: "Commands",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "ConclusionRegisterDate",
|
|
||||||
table: "Commands",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)",
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Commands",
|
|
||||||
table: "Commands",
|
|
||||||
column: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Commands_CommandId",
|
|
||||||
table: "CommandDocuments",
|
|
||||||
column: "CommandId",
|
|
||||||
principalTable: "Commands",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Commands_CommandStatuses_CommandStatusId",
|
|
||||||
table: "Commands",
|
|
||||||
column: "CommandStatusId",
|
|
||||||
principalTable: "CommandStatuses",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Commands_CommandTypes_CommandTypeId",
|
|
||||||
table: "Commands",
|
|
||||||
column: "CommandTypeId",
|
|
||||||
principalTable: "CommandTypes",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Commands_CommandId",
|
|
||||||
table: "CommandDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Commands_CommandStatuses_CommandStatusId",
|
|
||||||
table: "Commands");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Commands_CommandTypes_CommandTypeId",
|
|
||||||
table: "Commands");
|
|
||||||
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Commands",
|
|
||||||
table: "Commands");
|
|
||||||
|
|
||||||
migrationBuilder.RenameTable(
|
|
||||||
name: "Commands",
|
|
||||||
newName: "Command");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Commands_CommandTypeId",
|
|
||||||
table: "Command",
|
|
||||||
newName: "IX_Command_CommandTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Commands_CommandStatusId",
|
|
||||||
table: "Command",
|
|
||||||
newName: "IX_Command_CommandStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "PositionName",
|
|
||||||
table: "Command",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ตำแหน่งที่บรรจุ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldComment: "ตำแหน่งที่บรรจุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "ExamRoundId",
|
|
||||||
table: "Command",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "อ้างอิงรอบการสอบ",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldComment: "อ้างอิงรอบการสอบ")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ConclusionResultNo",
|
|
||||||
table: "Command",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "ConclusionResultDate",
|
|
||||||
table: "Command",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)",
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)",
|
|
||||||
oldComment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ConclusionRegisterNo",
|
|
||||||
table: "Command",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "ConclusionRegisterDate",
|
|
||||||
table: "Command",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)",
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)",
|
|
||||||
oldComment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Discriminator",
|
|
||||||
table: "Command",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Command",
|
|
||||||
table: "Command",
|
|
||||||
column: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Command_CommandStatuses_CommandStatusId",
|
|
||||||
table: "Command",
|
|
||||||
column: "CommandStatusId",
|
|
||||||
principalTable: "CommandStatuses",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Command_CommandTypes_CommandTypeId",
|
|
||||||
table: "Command",
|
|
||||||
column: "CommandTypeId",
|
|
||||||
principalTable: "CommandTypes",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_CommandDocuments_Command_CommandId",
|
|
||||||
table: "CommandDocuments",
|
|
||||||
column: "CommandId",
|
|
||||||
principalTable: "Command",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,55 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class addfieldtoCommandTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "CommandAffectDate",
|
|
||||||
table: "Commands",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "วันที่คำสั่งมีผล");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "CommandExcecuteDate",
|
|
||||||
table: "Commands",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "วันที่ออกคำสั่ง");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "CommandSubject",
|
|
||||||
table: "Commands",
|
|
||||||
type: "varchar(500)",
|
|
||||||
maxLength: 500,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
comment: "คำสั่งเรื่อง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CommandAffectDate",
|
|
||||||
table: "Commands");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CommandExcecuteDate",
|
|
||||||
table: "Commands");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CommandSubject",
|
|
||||||
table: "Commands");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,30 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class addSequencetoCommandTypeTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Sequence",
|
|
||||||
table: "CommandTypes",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ลำดับการทำงาน");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Sequence",
|
|
||||||
table: "CommandTypes");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,42 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class RemoveSequencefromCommandTypeTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Sequence",
|
|
||||||
table: "CommandTypes");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Sequence",
|
|
||||||
table: "CommandStatuses",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ลำดับการทำงาน");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Sequence",
|
|
||||||
table: "CommandStatuses");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Sequence",
|
|
||||||
table: "CommandTypes",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ลำดับการทำงาน");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,30 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddAuthorizedPositiontoCommandTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "AuthorizedPosition",
|
|
||||||
table: "Commands",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ตำแหน่งผู้มีอำนาจลงนาม")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "AuthorizedPosition",
|
|
||||||
table: "Commands");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,578 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddTableretire : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_InsigniaRequests_OrganizationOrganizations_OrganizationOrgan~",
|
|
||||||
table: "InsigniaRequests");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PosNo",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Position",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PositionLevel",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PositionType",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Insignia",
|
|
||||||
table: "ProfileInsignias");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Number",
|
|
||||||
table: "PlacementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "OrganizationOrganizationId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
newName: "OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_InsigniaRequests_OrganizationOrganizationId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
newName: "IX_InsigniaRequests_OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionLevelId",
|
|
||||||
table: "ProfileSalaries",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Id ระดับ")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Order",
|
|
||||||
table: "ProfileSalaries",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลำดับ");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PrefixId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Id คำนำหน้า")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionTypeId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Id ประเภทตำแหน่ง")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionLevelId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: " Id ระดับ")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Id ตำแหน่ง")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PosNoId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Id เลขที่ตำแหน่ง")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "GenderId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Id เพศ")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "Id",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "PrimaryKey",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)")
|
|
||||||
.Annotation("Relational:ColumnOrder", 0)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Retirements",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Round = table.Column<int>(type: "int", nullable: false, comment: "ครั้งที่"),
|
|
||||||
Type = table.Column<string>(type: "longtext", nullable: false, comment: "ประเภท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Retirements", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "RetirementProfiles",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Order = table.Column<int>(type: "int", nullable: false, comment: "ลำดับที่"),
|
|
||||||
Reason = table.Column<string>(type: "longtext", nullable: false, comment: "เหตุผล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Remove = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ลบออกจากเกษียญ"),
|
|
||||||
RetirementId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_RetirementProfiles", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RetirementProfiles_Profiles_ProfileId",
|
|
||||||
column: x => x.ProfileId,
|
|
||||||
principalTable: "Profiles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RetirementProfiles_Retirements_RetirementId",
|
|
||||||
column: x => x.RetirementId,
|
|
||||||
principalTable: "Retirements",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProfileSalaries_PositionLevelId",
|
|
||||||
table: "ProfileSalaries",
|
|
||||||
column: "PositionLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Profiles_GenderId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "GenderId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Profiles_PositionId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PositionId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Profiles_PositionLevelId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PositionLevelId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Profiles_PositionTypeId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PositionTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Profiles_PosNoId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PosNoId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Profiles_PrefixId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PrefixId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProfileInsignias_InsigniaId",
|
|
||||||
table: "ProfileInsignias",
|
|
||||||
column: "InsigniaId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RetirementProfiles_ProfileId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
column: "ProfileId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RetirementProfiles_RetirementId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
column: "RetirementId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_InsigniaRequests_Organizations_OrganizationId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
column: "OrganizationId",
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_ProfileInsignias_Insignias_InsigniaId",
|
|
||||||
table: "ProfileInsignias",
|
|
||||||
column: "InsigniaId",
|
|
||||||
principalTable: "Insignias",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Profiles_Genders_GenderId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "GenderId",
|
|
||||||
principalTable: "Genders",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Profiles_PositionLevels_PositionLevelId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PositionLevelId",
|
|
||||||
principalTable: "PositionLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Profiles_PositionNumbers_PosNoId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PosNoId",
|
|
||||||
principalTable: "PositionNumbers",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Profiles_PositionPaths_PositionId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PositionId",
|
|
||||||
principalTable: "PositionPaths",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Profiles_PositionTypes_PositionTypeId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PositionTypeId",
|
|
||||||
principalTable: "PositionTypes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Profiles_Prefixes_PrefixId",
|
|
||||||
table: "Profiles",
|
|
||||||
column: "PrefixId",
|
|
||||||
principalTable: "Prefixes",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_ProfileSalaries_PositionLevels_PositionLevelId",
|
|
||||||
table: "ProfileSalaries",
|
|
||||||
column: "PositionLevelId",
|
|
||||||
principalTable: "PositionLevels",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_InsigniaRequests_Organizations_OrganizationId",
|
|
||||||
table: "InsigniaRequests");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_ProfileInsignias_Insignias_InsigniaId",
|
|
||||||
table: "ProfileInsignias");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Profiles_Genders_GenderId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Profiles_PositionLevels_PositionLevelId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Profiles_PositionNumbers_PosNoId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Profiles_PositionPaths_PositionId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Profiles_PositionTypes_PositionTypeId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Profiles_Prefixes_PrefixId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_ProfileSalaries_PositionLevels_PositionLevelId",
|
|
||||||
table: "ProfileSalaries");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "RetirementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Retirements");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_ProfileSalaries_PositionLevelId",
|
|
||||||
table: "ProfileSalaries");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Profiles_GenderId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Profiles_PositionId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Profiles_PositionLevelId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Profiles_PositionTypeId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Profiles_PosNoId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Profiles_PrefixId",
|
|
||||||
table: "Profiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_ProfileInsignias_InsigniaId",
|
|
||||||
table: "ProfileInsignias");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Order",
|
|
||||||
table: "ProfileSalaries");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "OrganizationId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
newName: "OrganizationOrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_InsigniaRequests_OrganizationId",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
newName: "IX_InsigniaRequests_OrganizationOrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionLevelId",
|
|
||||||
table: "ProfileSalaries",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "Id ระดับ",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PrefixId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "Id คำนำหน้า",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionTypeId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "Id ประเภทตำแหน่ง",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionLevelId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: " Id ระดับ",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PositionId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "Id ตำแหน่ง",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PosNoId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "Id เลขที่ตำแหน่ง",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "GenderId",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
comment: "Id เพศ",
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "Id",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldComment: "PrimaryKey")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "PosNo",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "เลขที่ตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Position",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "PositionLevel",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ระดับ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "PositionType",
|
|
||||||
table: "Profiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ประเภทตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "Insignia",
|
|
||||||
table: "ProfileInsignias",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ชื่อเครื่องราชฯ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Number",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลำดับที่สอบได้");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_InsigniaRequests_OrganizationOrganizations_OrganizationOrgan~",
|
|
||||||
table: "InsigniaRequests",
|
|
||||||
column: "OrganizationOrganizationId",
|
|
||||||
principalTable: "OrganizationOrganizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,119 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class updateTableretiretoRetirementPeriod : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_RetirementProfiles_Retirements_RetirementId",
|
|
||||||
table: "RetirementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Retirements");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "RetirementId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
newName: "RetirementPeriodId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_RetirementProfiles_RetirementId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
newName: "IX_RetirementProfiles_RetirementPeriodId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "RetirementPeriods",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Round = table.Column<int>(type: "int", nullable: false, comment: "ครั้งที่"),
|
|
||||||
Type = table.Column<string>(type: "longtext", nullable: false, comment: "ประเภท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_RetirementPeriods", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_RetirementProfiles_RetirementPeriods_RetirementPeriodId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
column: "RetirementPeriodId",
|
|
||||||
principalTable: "RetirementPeriods",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_RetirementProfiles_RetirementPeriods_RetirementPeriodId",
|
|
||||||
table: "RetirementProfiles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "RetirementPeriods");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "RetirementPeriodId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
newName: "RetirementId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_RetirementProfiles_RetirementPeriodId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
newName: "IX_RetirementProfiles_RetirementId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Retirements",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Round = table.Column<int>(type: "int", nullable: false, comment: "ครั้งที่"),
|
|
||||||
Type = table.Column<string>(type: "longtext", nullable: false, comment: "ประเภท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Retirements", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_RetirementProfiles_Retirements_RetirementId",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
column: "RetirementId",
|
|
||||||
principalTable: "Retirements",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,76 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class updateTableretireaddyear : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Remove",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ลบออกจากเกษียญ",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "ลบออกจากเกษียญ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Year",
|
|
||||||
table: "RetirementPeriods",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ปีงบประมาณ");
|
|
||||||
|
|
||||||
// migrationBuilder.AddColumn<DateTime>(
|
|
||||||
// name: "RefCommandDate",
|
|
||||||
// table: "ProfileInsignias",
|
|
||||||
// type: "datetime(6)",
|
|
||||||
// nullable: true,
|
|
||||||
// comment: "เอกสารอ้างอิง (ลงวันที่)");
|
|
||||||
|
|
||||||
// migrationBuilder.AddColumn<string>(
|
|
||||||
// name: "RefCommandNo",
|
|
||||||
// table: "ProfileInsignias",
|
|
||||||
// type: "longtext",
|
|
||||||
// nullable: true,
|
|
||||||
// comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)")
|
|
||||||
// .Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Year",
|
|
||||||
table: "RetirementPeriods");
|
|
||||||
|
|
||||||
// migrationBuilder.DropColumn(
|
|
||||||
// name: "RefCommandDate",
|
|
||||||
// table: "ProfileInsignias");
|
|
||||||
|
|
||||||
// migrationBuilder.DropColumn(
|
|
||||||
// name: "RefCommandNo",
|
|
||||||
// table: "ProfileInsignias");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "Remove",
|
|
||||||
table: "RetirementProfiles",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ลบออกจากเกษียญ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldComment: "ลบออกจากเกษียญ")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,84 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class updateTableplacementExamNumbernullable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "ExamRound",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "จำนวนครั้งที่สมัครสอบ",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldComment: "จำนวนครั้งที่สมัครสอบ");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "ExamNumber",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลำดับที่สอบได้",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldComment: "ลำดับที่สอบได้");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "DurationYear",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ระยะเวลาหลักสูตร",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldComment: "ระยะเวลาหลักสูตร");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "ExamRound",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "จำนวนครั้งที่สมัครสอบ",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "จำนวนครั้งที่สมัครสอบ");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "ExamNumber",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ลำดับที่สอบได้",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "ลำดับที่สอบได้");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "DurationYear",
|
|
||||||
table: "PlacementEducations",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
comment: "ระยะเวลาหลักสูตร",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "ระยะเวลาหลักสูตร");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,78 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class updateTableplacementprofilemobolelimit200 : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Telephone",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(200)",
|
|
||||||
maxLength: 200,
|
|
||||||
nullable: true,
|
|
||||||
comment: "โทรศัพท์",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(20)",
|
|
||||||
oldMaxLength: 20,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "โทรศัพท์")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "MobilePhone",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(200)",
|
|
||||||
maxLength: 200,
|
|
||||||
nullable: true,
|
|
||||||
comment: "โทรศัพท์มือถือ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(20)",
|
|
||||||
oldMaxLength: 20,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "โทรศัพท์มือถือ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Telephone",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(20)",
|
|
||||||
maxLength: 20,
|
|
||||||
nullable: true,
|
|
||||||
comment: "โทรศัพท์",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(200)",
|
|
||||||
oldMaxLength: 200,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "โทรศัพท์")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "MobilePhone",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(20)",
|
|
||||||
maxLength: 20,
|
|
||||||
nullable: true,
|
|
||||||
comment: "โทรศัพท์มือถือ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(200)",
|
|
||||||
oldMaxLength: 200,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "โทรศัพท์มือถือ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,48 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class updateTableplacementprofilemobilelimit200 : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "OccupationTelephone",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(200)",
|
|
||||||
maxLength: 200,
|
|
||||||
nullable: true,
|
|
||||||
comment: "โทรศัพท์ บริษัท",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(20)",
|
|
||||||
oldMaxLength: 20,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "โทรศัพท์ บริษัท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "OccupationTelephone",
|
|
||||||
table: "PlacementProfiles",
|
|
||||||
type: "varchar(20)",
|
|
||||||
maxLength: 20,
|
|
||||||
nullable: true,
|
|
||||||
comment: "โทรศัพท์ บริษัท",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(200)",
|
|
||||||
oldMaxLength: 200,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "โทรศัพท์ บริษัท")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,109 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddCommandDeployandReceiver : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "CommandDeployments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CommandId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงคำสั่ง", collation: "ascii_general_ci"),
|
|
||||||
ReceiveUserId = table.Column<string>(type: "longtext", nullable: false, comment: "รหัสอ้างอิงผู้ใช้งานระบบ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsSendMail = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งอีเมล์หรือไม่?"),
|
|
||||||
IsSendInbox = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งกล่องข้อความหรือไม่?"),
|
|
||||||
IsSendNotification = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งแจ้งเตือนหรือไม่?")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_CommandDeployments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_CommandDeployments_Commands_CommandId",
|
|
||||||
column: x => x.CommandId,
|
|
||||||
principalTable: "Commands",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "CommandReceivers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
|
||||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
|
||||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CommandId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงคำสั่ง", collation: "ascii_general_ci"),
|
|
||||||
Sequence = table.Column<int>(type: "int", nullable: false, comment: "ลำดับในบัญชีแนบท้าย"),
|
|
||||||
CitizenId = table.Column<string>(type: "varchar(13)", maxLength: 13, nullable: false, comment: "เลขประจำตัวประชาชน")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Prefix = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "คำนำหน้านาม")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
FirstName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "นามสกุล")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Comment = table.Column<string>(type: "text", nullable: false, comment: "หมายเหตุ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_CommandReceivers", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_CommandReceivers_Commands_CommandId",
|
|
||||||
column: x => x.CommandId,
|
|
||||||
principalTable: "Commands",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_CommandDeployments_CommandId",
|
|
||||||
table: "CommandDeployments",
|
|
||||||
column: "CommandId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_CommandReceivers_CommandId",
|
|
||||||
table: "CommandReceivers",
|
|
||||||
column: "CommandId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "CommandDeployments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "CommandReceivers");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,278 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class updateTablepositionpathaddorder : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PositionTypes",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อประเภทตำแหน่ง",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อประเภทตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 2)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "PositionTypes",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "สถานะการใช้งาน")
|
|
||||||
.Annotation("Relational:ColumnOrder", 3)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Order",
|
|
||||||
table: "PositionTypes",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลำดับ")
|
|
||||||
.Annotation("Relational:ColumnOrder", 1);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ShortName",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อย่อระดับตำแหน่ง",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อย่อระดับตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 3)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อระดับตำแหน่ง",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อระดับตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 2)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "Level",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ลำดับชั้นของระดับตำแหน่ง",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldComment: "ลำดับชั้นของระดับตำแหน่ง")
|
|
||||||
.Annotation("Relational:ColumnOrder", 4)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "สถานะการใช้งาน")
|
|
||||||
.Annotation("Relational:ColumnOrder", 5)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 4);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Order",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลำดับ")
|
|
||||||
.Annotation("Relational:ColumnOrder", 1);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PositionEmployeeLevels",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 2)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "PositionEmployeeLevels",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "สถานะการใช้งาน")
|
|
||||||
.Annotation("Relational:ColumnOrder", 3)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Order",
|
|
||||||
table: "PositionEmployeeLevels",
|
|
||||||
type: "int",
|
|
||||||
nullable: true,
|
|
||||||
comment: "ลำดับ")
|
|
||||||
.Annotation("Relational:ColumnOrder", 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Order",
|
|
||||||
table: "PositionTypes");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Order",
|
|
||||||
table: "PositionLevels");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Order",
|
|
||||||
table: "PositionEmployeeLevels");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PositionTypes",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อประเภทตำแหน่ง",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อประเภทตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 1)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "PositionTypes",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "สถานะการใช้งาน")
|
|
||||||
.Annotation("Relational:ColumnOrder", 2)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ShortName",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อย่อระดับตำแหน่ง",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อย่อระดับตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 2)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อระดับตำแหน่ง",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อระดับตำแหน่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 1)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "Level",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
comment: "ลำดับชั้นของระดับตำแหน่ง",
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int",
|
|
||||||
oldComment: "ลำดับชั้นของระดับตำแหน่ง")
|
|
||||||
.Annotation("Relational:ColumnOrder", 3)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 4);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "PositionLevels",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "สถานะการใช้งาน")
|
|
||||||
.Annotation("Relational:ColumnOrder", 4)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 5);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "PositionEmployeeLevels",
|
|
||||||
type: "varchar(100)",
|
|
||||||
maxLength: 100,
|
|
||||||
nullable: false,
|
|
||||||
comment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "varchar(100)",
|
|
||||||
oldMaxLength: 100,
|
|
||||||
oldComment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.Annotation("Relational:ColumnOrder", 1)
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "PositionEmployeeLevels",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
oldClrType: typeof(bool),
|
|
||||||
oldType: "tinyint(1)",
|
|
||||||
oldComment: "สถานะการใช้งาน")
|
|
||||||
.Annotation("Relational:ColumnOrder", 2)
|
|
||||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,32 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddOwnerGovIdtoCommandTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "OwnerGovId",
|
|
||||||
table: "Commands",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
comment: "รหัสส่วนราชการผู้ออกคำสั่ง",
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "OwnerGovId",
|
|
||||||
table: "Commands");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,30 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace BMA.EHR.Infrastructure.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddCommandCodetoCommandTypeTable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "CommandCode",
|
|
||||||
table: "CommandTypes",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
comment: "รหัสของประเภทคำสั่ง")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CommandCode",
|
|
||||||
table: "CommandTypes");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue