Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-dange committed Nov 28, 2023
1 parent 1a53559 commit 0513afe
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions migrations/0037-remove-unique-checkin-code-constraint.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import {MigrationInterface, QueryRunner} from "typeorm";
import { MigrationInterface, QueryRunner } from 'typeorm';

const TABLE_NAME = 'Events';
const CONSTRAINT_NAME = 'Events_attendanceCode_key';

export class removeUniqueCheckinCodeConstraint1701156281658 implements MigrationInterface {
export class RemoveUniqueCheckinCodeConstraint1701156281658 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" DROP CONSTRAINT "${CONSTRAINT_NAME}"`);
}

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" DROP CONSTRAINT "${CONSTRAINT_NAME}"`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" ADD UNIQUE ("attendanceCode")`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" ADD UNIQUE ("attendanceCode")`);
}
}

0 comments on commit 0513afe

Please sign in to comment.