fix: change structure

This commit is contained in:
Methapon2001 2024-06-10 16:50:17 +07:00
parent 9c4e47105d
commit aba68af123
3 changed files with 95 additions and 15 deletions

View file

@ -0,0 +1,45 @@
/*
Warnings:
- You are about to drop the column `arrivalBarricade` on the `Employee` table. All the data in the column will be lost.
- You are about to drop the column `arrivalCardNo` on the `Employee` table. All the data in the column will be lost.
- You are about to drop the column `email` on the `Employee` table. All the data in the column will be lost.
- You are about to drop the column `telephoneNo` on the `Employee` table. All the data in the column will be lost.
- Added the required column `entryDate` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `passportExpiryDate` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `passportIssueDate` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `passportIssuingCountry` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `passportIssuingPlace` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `passportNumber` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `passportType` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `tm6Number` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `visaExpiryDate` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `visaIssueDate` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `visaIssuingPlace` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `visaNumber` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `visaStayUntilDate` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `visaType` to the `Employee` table without a default value. This is not possible if the table is not empty.
- Added the required column `workerStatus` to the `Employee` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Employee" DROP COLUMN "arrivalBarricade",
DROP COLUMN "arrivalCardNo",
DROP COLUMN "email",
DROP COLUMN "telephoneNo",
ADD COLUMN "entryDate" TIMESTAMP(3) NOT NULL,
ADD COLUMN "passportExpiryDate" TIMESTAMP(3) NOT NULL,
ADD COLUMN "passportIssueDate" TIMESTAMP(3) NOT NULL,
ADD COLUMN "passportIssuingCountry" TEXT NOT NULL,
ADD COLUMN "passportIssuingPlace" TEXT NOT NULL,
ADD COLUMN "passportNumber" TEXT NOT NULL,
ADD COLUMN "passportType" TEXT NOT NULL,
ADD COLUMN "previousPassportReference" TEXT,
ADD COLUMN "tm6Number" TEXT NOT NULL,
ADD COLUMN "visaExpiryDate" TIMESTAMP(3) NOT NULL,
ADD COLUMN "visaIssueDate" TIMESTAMP(3) NOT NULL,
ADD COLUMN "visaIssuingPlace" TEXT NOT NULL,
ADD COLUMN "visaNumber" TEXT NOT NULL,
ADD COLUMN "visaStayUntilDate" TIMESTAMP(3) NOT NULL,
ADD COLUMN "visaType" TEXT NOT NULL,
ADD COLUMN "workerStatus" TEXT NOT NULL;