-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from fairnesscoop/feat/add-illimited-leaves
Add illimlited leave type
- Loading branch information
Showing
5 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {MigrationInterface, QueryRunner} from "typeorm"; | ||
|
||
export class IllimitedLeaveType1651234850677 implements MigrationInterface { | ||
name = 'IllimitedLeaveType1651234850677' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TYPE "leave_request_type_enum" RENAME TO "leave_request_type_enum_old"`); | ||
await queryRunner.query(`CREATE TYPE "leave_request_type_enum" AS ENUM('paid', 'unpaid', 'special', 'medical', 'illimited')`); | ||
await queryRunner.query(`ALTER TABLE "leave_request" ALTER COLUMN "type" TYPE "leave_request_type_enum" USING "type"::"text"::"leave_request_type_enum"`); | ||
await queryRunner.query(`DROP TYPE "leave_request_type_enum_old"`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`CREATE TYPE "leave_request_type_enum_old" AS ENUM('paid', 'unpaid', 'special', 'medical')`); | ||
await queryRunner.query(`ALTER TABLE "leave_request" ALTER COLUMN "type" TYPE "leave_request_type_enum_old" USING "type"::"text"::"leave_request_type_enum_old"`); | ||
await queryRunner.query(`DROP TYPE "leave_request_type_enum"`); | ||
await queryRunner.query(`ALTER TYPE "leave_request_type_enum_old" RENAME TO "leave_request_type_enum"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters