-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update Handle entity and HandleStore to save parent handles
- update migration with handle parent migration for parent handles - store parent handle data in db - fix mint-handles.js script that was broken due to refactor - extend withHandles mappers to extract subhandle data - fix e2e test to take more handle data - generate sql data for subhandles to be used in tests - extend TypeOrmHandleProvider to resolve parent handles
- Loading branch information
Showing
19 changed files
with
15,024 additions
and
8,663 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/cardano-services/src/Projection/migrations/1700556589063-handle-parent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { HandleEntity } from '@cardano-sdk/projection-typeorm'; | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class HandleParentMigration1700556589063 implements MigrationInterface { | ||
static entity = HandleEntity; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query('ALTER TABLE "handle" ADD COLUMN "parent_handle_handle" character varying'); | ||
await queryRunner.query( | ||
'ALTER TABLE "handle" ADD CONSTRAINT "FK_handle_parent_handle_handle" FOREIGN KEY ("parent_handle_handle") REFERENCES "handle"("handle") ON DELETE CASCADE ON UPDATE NO ACTION' | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query('ALTER TABLE "handle" DROP CONSTRAINT "FK_handle_parent_handle_handle"'); | ||
await queryRunner.query('ALTER TABLE "handle" DROP COLUMN "parent_handle_handle"'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3,239 changes: 1,800 additions & 1,439 deletions
3,239
packages/cardano-services/test/jest-setup/snapshots/asset.sql
Large diffs are not rendered by default.
Oops, something went wrong.
12,802 changes: 8,667 additions & 4,135 deletions
12,802
packages/cardano-services/test/jest-setup/snapshots/db_sync.sql
Large diffs are not rendered by default.
Oops, something went wrong.
3,361 changes: 1,880 additions & 1,481 deletions
3,361
packages/cardano-services/test/jest-setup/snapshots/handle.sql
Large diffs are not rendered by default.
Oops, something went wrong.
3,620 changes: 2,049 additions & 1,571 deletions
3,620
packages/cardano-services/test/jest-setup/snapshots/stake_pool.sql
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.