• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 11367733917

16 Oct 2024 02:24PM UTC coverage: 90.591% (-0.6%) from 91.148%
11367733917

Pull #1988

github

PooyaRaki
Refactor unit tests, initializes postgres database on module startup, reverts v1 migration configuration
Pull Request #1988: OrmMigrationAndLogger

2655 of 3258 branches covered (81.49%)

Branch coverage included in aggregate %.

89 of 160 new or added lines in 17 files covered. (55.63%)

8802 of 9389 relevant lines covered (93.75%)

409.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/migrations/1727451367471-notifications_enum.ts
1
import { MigrationInterface, QueryRunner } from 'typeorm';
2

NEW
3
export class NotificationsEnum1727451367471 implements MigrationInterface {
×
NEW
4
  name = 'NotificationsEnum1727451367471';
×
5

6
  public async up(queryRunner: QueryRunner): Promise<void> {
NEW
7
    await queryRunner.query(
×
8
      `ALTER TABLE "notification_types" DROP CONSTRAINT "name"`,
9
    );
NEW
10
    await queryRunner.query(
×
11
      `ALTER TABLE "notification_types" DROP COLUMN "name"`,
12
    );
NEW
13
    await queryRunner.query(
×
14
      `CREATE TYPE "public"."notification_types_name_enum" AS ENUM('CONFIRMATION_REQUEST', 'DELETED_MULTISIG_TRANSACTION', 'EXECUTED_MULTISIG_TRANSACTION', 'INCOMING_ETHER', 'INCOMING_TOKEN', 'MODULE_TRANSACTION', 'MESSAGE_CONFIRMATION_REQUEST')`,
15
    );
NEW
16
    await queryRunner.query(
×
17
      `ALTER TABLE "notification_types" ADD "name" "public"."notification_types_name_enum" NOT NULL`,
18
    );
NEW
19
    await queryRunner.query(
×
20
      `ALTER TABLE "notification_types" ADD CONSTRAINT "UQ_1d7eaa0dcf0fbfd0a8e6bdbc9c9" UNIQUE ("name")`,
21
    );
NEW
22
    await queryRunner.query(
×
23
      `ALTER TABLE "push_notification_devices" DROP COLUMN "device_type"`,
24
    );
NEW
25
    await queryRunner.query(
×
26
      `CREATE TYPE "public"."push_notification_devices_device_type_enum" AS ENUM('ANDROID', 'IOS', 'WEB')`,
27
    );
NEW
28
    await queryRunner.query(
×
29
      `ALTER TABLE "push_notification_devices" ADD "device_type" "public"."push_notification_devices_device_type_enum" NOT NULL`,
30
    );
31
  }
32

33
  public async down(queryRunner: QueryRunner): Promise<void> {
NEW
34
    await queryRunner.query(
×
35
      `ALTER TABLE "push_notification_devices" DROP COLUMN "device_type"`,
36
    );
NEW
37
    await queryRunner.query(
×
38
      `DROP TYPE "public"."push_notification_devices_device_type_enum"`,
39
    );
NEW
40
    await queryRunner.query(
×
41
      `ALTER TABLE "push_notification_devices" ADD "device_type" character varying(255) NOT NULL`,
42
    );
NEW
43
    await queryRunner.query(
×
44
      `ALTER TABLE "notification_types" DROP CONSTRAINT "UQ_1d7eaa0dcf0fbfd0a8e6bdbc9c9"`,
45
    );
NEW
46
    await queryRunner.query(
×
47
      `ALTER TABLE "notification_types" DROP COLUMN "name"`,
48
    );
NEW
49
    await queryRunner.query(
×
50
      `DROP TYPE "public"."notification_types_name_enum"`,
51
    );
NEW
52
    await queryRunner.query(
×
53
      `ALTER TABLE "notification_types" ADD "name" character varying(255) NOT NULL`,
54
    );
NEW
55
    await queryRunner.query(
×
56
      `ALTER TABLE "notification_types" ADD CONSTRAINT "name" UNIQUE ("name")`,
57
    );
58
  }
59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc