forked from software-mansion-labs/GoL2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from yuki-wtf/handle-pending-mints
add function to update pending snapshots
- Loading branch information
Showing
5 changed files
with
83 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,7 @@ dmypy.json | |
.pyre/ | ||
|
||
# indexer modules | ||
node_modules/ | ||
node_modules/ | ||
|
||
certificates | ||
*.crt |
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,23 @@ | ||
import { Column, CreateDateColumn, Entity, Index, PrimaryColumn, UpdateDateColumn } from "typeorm" | ||
|
||
@Entity() | ||
export class Mints { | ||
@Index() | ||
@PrimaryColumn({type: "integer", unique: true}) | ||
generation!: number; | ||
|
||
@Column() | ||
userId!: string; | ||
|
||
@Column() | ||
txHash!: string; | ||
|
||
@Column() | ||
status!: string; | ||
|
||
@CreateDateColumn() | ||
createdAt!: Date; | ||
|
||
@UpdateDateColumn() | ||
updatedDate!: Date | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class migration1706466839411 implements MigrationInterface { | ||
name = 'migration1706466839411' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`CREATE TABLE "mints" ("generation" integer NOT NULL, "userId" character varying NOT NULL, "txHash" character varying NOT NULL, "status" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedDate" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_391ba31dd81cfe86148e7c915ba" PRIMARY KEY ("generation"))`); | ||
await queryRunner.query(`CREATE INDEX "IDX_391ba31dd81cfe86148e7c915b" ON "mints" ("generation") `); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`DROP INDEX "public"."IDX_391ba31dd81cfe86148e7c915b"`); | ||
await queryRunner.query(`DROP TABLE "mints"`); | ||
} | ||
|
||
} |
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