Skip to content

Commit a2891b7

Browse files
fix: make connection price nullable
1 parent 829808b commit a2891b7

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = class fix_connection_price1655129942761 {
2+
name = 'fix_connection_price1655129942761'
3+
4+
async up(db) {
5+
await db.query(`ALTER TABLE "node" ALTER COLUMN "connection_price" DROP NOT NULL`)
6+
}
7+
8+
async down(db) {
9+
await db.query(`ALTER TABLE "node" ALTER COLUMN "connection_price" SET NOT NULL`)
10+
}
11+
}

processor-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v2
22
name: tfchain-processor
33
description: A chart for the tfchain graphql processor and query node
44
version: 1.0.4
5-
appVersion: "2.3.1"
5+
appVersion: "2.3.2"

schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ type Node @entity {
8282
serialNumber: String
8383
createdAt: BigInt!
8484
updatedAt: BigInt!
85-
connectionPrice: Int!
85+
connectionPrice: Int
8686
}
8787

8888
type NodeResourcesTotal @entity {

src/model/generated/node.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ export class Node {
7373
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
7474
updatedAt!: bigint
7575

76-
@Column_("integer", {nullable: false})
77-
connectionPrice!: number
76+
@Column_("integer", {nullable: true})
77+
connectionPrice!: number | undefined | null
7878
}

0 commit comments

Comments
 (0)