-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: import legacy projects api events (#1047)
* feat: import legacy projects api events * feat: import legacy projects piece api events
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
api/apps/api/src/migrations/api/1652099652734-AddImportLegacyProjectsApiEvents.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,42 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class AddImportLegacyProjectsApiEvents1652099652734 | ||
implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
INSERT INTO api_event_kinds (id) values | ||
('project.legacy.import.submitted/v1/alpha'), | ||
('project.legacy.import.finished/v1/alpha'), | ||
('project.legacy.import.failed/v1/alpha'), | ||
('project.legacy.import.piece.submitted/v1/alpha'), | ||
('project.legacy.import.piece.finished/v1/alpha'), | ||
('project.legacy.import.piece.failed/v1/alpha'); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DELETE FROM api_event_kinds WHERE id = 'project.legacy.import.submitted/v1/alpha';`, | ||
); | ||
|
||
await queryRunner.query( | ||
`DELETE FROM api_event_kinds WHERE id = 'project.legacy.import.finished/v1/alpha';`, | ||
); | ||
|
||
await queryRunner.query( | ||
`DELETE FROM api_event_kinds WHERE id = 'project.legacy.import.failed/v1/alpha';`, | ||
); | ||
|
||
await queryRunner.query( | ||
`DELETE FROM api_event_kinds WHERE id = 'project.legacy.import.piece.submitted/v1/alpha';`, | ||
); | ||
|
||
await queryRunner.query( | ||
`DELETE FROM api_event_kinds WHERE id = 'project.legacy.import.piece.finished/v1/alpha';`, | ||
); | ||
|
||
await queryRunner.query( | ||
`DELETE FROM api_event_kinds WHERE id = 'project.legacy.import.piece.failed/v1/alpha';`, | ||
); | ||
} | ||
} |
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