-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update roster page to support filtering
- Loading branch information
1 parent
91e5bf1
commit 228e67c
Showing
12 changed files
with
899 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
27 changes: 27 additions & 0 deletions
27
server/migration/1606327183104-StartAndEndDateColumnsType.ts
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,27 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class StartAndEndDateColumnsType1606327183104 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "roster" ADD "start_date_value" DATE DEFAULT null`); | ||
await queryRunner.query(`UPDATE "roster" SET "start_date_value" = DATE(start_date)`); | ||
await queryRunner.query(`ALTER TABLE "roster" ALTER COLUMN start_date TYPE DATE USING start_date_value`); | ||
await queryRunner.query(`ALTER TABLE "roster" DROP COLUMN "start_date_value"`); | ||
|
||
await queryRunner.query(`ALTER TABLE "roster" ADD "end_date_value" DATE DEFAULT null`); | ||
await queryRunner.query(`UPDATE "roster" SET "end_date_value" = DATE(end_date)`); | ||
await queryRunner.query(`ALTER TABLE "roster" ALTER COLUMN end_date TYPE DATE USING end_date_value`); | ||
await queryRunner.query(`ALTER TABLE "roster" DROP COLUMN "end_date_value"`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "roster" ADD "start_date_value" timestamp without time zone DEFAULT null`); | ||
await queryRunner.query(`UPDATE "roster" SET "start_date_value" = start_date::TIMESTAMP`); | ||
await queryRunner.query(`ALTER TABLE "roster" ALTER COLUMN start_date TYPE timestamp without time zone USING start_date_value`); | ||
await queryRunner.query(`ALTER TABLE "roster" DROP COLUMN "start_date_value"`); | ||
|
||
await queryRunner.query(`ALTER TABLE "roster" ADD "end_date_value" timestamp without time zone DEFAULT null`); | ||
await queryRunner.query(`UPDATE "roster" SET "end_date_value" = end_date::TIMESTAMP`); | ||
await queryRunner.query(`ALTER TABLE "roster" ALTER COLUMN end_date TYPE timestamp without time zone USING end_date_value`); | ||
await queryRunner.query(`ALTER TABLE "roster" DROP COLUMN "end_date_value"`); | ||
} | ||
} |
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
Oops, something went wrong.