Skip to content

Commit

Permalink
refactor: clean up migration and improve formatting for subscriber em…
Browse files Browse the repository at this point in the history
…ail notification footer text
  • Loading branch information
simlarsen committed Jan 24, 2025
1 parent aac4281 commit 2702313
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { MigrationInterface, QueryRunner } from "typeorm";

export class MigrationName1737715240684 implements MigrationInterface {
public name = 'MigrationName1737715240684'
public name = "MigrationName1737715240684";

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "StatusPage" DROP COLUMN "subscriberEmailNotificationFooterText"`);
await queryRunner.query(`ALTER TABLE "StatusPage" ADD "subscriberEmailNotificationFooterText" text`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "StatusPage" DROP COLUMN "subscriberEmailNotificationFooterText"`);
await queryRunner.query(`ALTER TABLE "StatusPage" ADD "subscriberEmailNotificationFooterText" character varying(100)`);
}
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "StatusPage" DROP COLUMN "subscriberEmailNotificationFooterText"`,
);
await queryRunner.query(
`ALTER TABLE "StatusPage" ADD "subscriberEmailNotificationFooterText" text`,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "StatusPage" DROP COLUMN "subscriberEmailNotificationFooterText"`,
);
await queryRunner.query(
`ALTER TABLE "StatusPage" ADD "subscriberEmailNotificationFooterText" character varying(100)`,
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,5 @@ export default [
MigrationName1736856662868,
MigrationName1737141420441,
MigrationName1737713529424,
MigrationName1737715240684
MigrationName1737715240684,
];
5 changes: 3 additions & 2 deletions Dashboard/src/Pages/StatusPages/View/SubscriberSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ const StatusPageDelete: FunctionComponent<
title: "Subscriber Email Notification Footer Text",
fieldType: FormFieldSchemaType.LongText,
required: false,
placeholder: "This is an automated email sent to you because you are subscribed to Status Page.",
placeholder:
"This is an automated email sent to you because you are subscribed to Status Page.",
description:
"This text will be added at the end of the email notification sent to subscribers. You can use this to add any additional information or links.",
},
Expand Down Expand Up @@ -177,7 +178,7 @@ const StatusPageDelete: FunctionComponent<
title: "Subscriber Email Notification Footer Text",
description:
"This text will be added at the end of the email notification sent to subscribers. You can use this to add any additional information or links.",
}
},
],
modelId: modelId,
}}
Expand Down

0 comments on commit 2702313

Please sign in to comment.