diff --git a/backend/back/src/database.ts b/backend/back/src/database.ts index c5cef1ec..5b2e4d29 100644 --- a/backend/back/src/database.ts +++ b/backend/back/src/database.ts @@ -78,6 +78,7 @@ import { CreateRiotGamesActions1698964479850 } from "./workflows/seed/1698964479 import { CreateTodoistCreateTaskReaction1699101589099 } from "./workflows/seed/1699101589099-CreateTodoistCreateTaskReaction"; import { CreateAirtableDeleteRecordReaction1699107944021 } from "./workflows/seed/1699107944021-CreateAirtableDeleteRecordReaction"; import { CreateTwitterCreateTweetReaction1699115775099 } from "./workflows/seed/1699115775099-CreateTwitterCreateTweetReaction"; +import { ChangeRiotLogoToSvg1699116526789 } from "./services/seed/1699116526789-ChangeRiotLogoToSvg"; dotenv.config(); @@ -159,6 +160,7 @@ export const DATA_SOURCE_OPTIONS: DataSourceOptions = { CreateTodoistCreateTaskReaction1699101589099, CreateAirtableDeleteRecordReaction1699107944021, CreateTwitterCreateTweetReaction1699115775099, + ChangeRiotLogoToSvg1699116526789, ], synchronize: process.env.NODE_ENV === "development", }; diff --git a/backend/back/src/services/seed/1699116526789-ChangeRiotLogoToSvg.ts b/backend/back/src/services/seed/1699116526789-ChangeRiotLogoToSvg.ts new file mode 100644 index 00000000..8b426887 --- /dev/null +++ b/backend/back/src/services/seed/1699116526789-ChangeRiotLogoToSvg.ts @@ -0,0 +1,22 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class ChangeRiotLogoToSvg1699116526789 implements MigrationInterface { + private readonly PREVIOUS_RIOT_IMAGE = "https://i.pinimg.com/originals/90/6d/23/906d231cbaff55c77fb97191592e1c76.png"; + private readonly NEW_RIOT_IMAGE = "https://asset.brandfetch.io/idtxF1ugCc/idSaLQdGtL.svg"; + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `UPDATE service + SET image_url = '${this.NEW_RIOT_IMAGE}' + WHERE id = 'riot'`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `UPDATE service + SET image_url = '${this.PREVIOUS_RIOT_IMAGE}' + WHERE id = 'riot'`, + ); + } +}