Skip to content

Commit

Permalink
add index for project stellar address
Browse files Browse the repository at this point in the history
  • Loading branch information
Meriem-BM committed Sep 1, 2024
1 parent 924ac42 commit 230cc91
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions migration/1725188424424-UniqueProjectAdressWithMomoForStellar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class UniqueProjectAdressWithMomoForStellar1725188424424
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE UNIQUE INDEX unique_stellar_address
ON project_address (address, memo)
WHERE "chainType" = 'STELLAR';
`);

Check failure on line 12 in migration/1725188424424-UniqueProjectAdressWithMomoForStellar.ts

View workflow job for this annotation

GitHub Actions / test

Delete `⏎`
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
DROP INDEX unique_stellar_address;
`);
}
}

0 comments on commit 230cc91

Please sign in to comment.