Skip to content

Commit

Permalink
fix: drop twin ip values in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVerstraete committed Feb 2, 2023
1 parent 2cd8642 commit 200e77e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = class Data1673510995256 {
name = 'Data1673510995256'

async up(db) {
await db.query(`ALTER TABLE "twin" RENAME COLUMN "ip" TO "relay"`)
await db.query(`ALTER TABLE "twin" ALTER COLUMN "relay" DROP NOT NULL`)
await db.query(`ALTER TABLE "twin" DROP COLUMN "ip"`)
await db.query(`ALTER TABLE "twin" ADD "relay" text`)
await db.query(`ALTER TABLE "twin" ADD "public_key" text`)
await db.query(`ALTER TABLE "historical_balance" DROP CONSTRAINT "FK_383ff006e4b59db91d32cb891e9"`)
await db.query(`ALTER TABLE "historical_balance" ALTER COLUMN "account_id" DROP NOT NULL`)
Expand All @@ -26,8 +26,8 @@ module.exports = class Data1673510995256 {
}

async down(db) {
await db.query(`ALTER TABLE "twin" RENAME COLUMN "relay" TO "ip"`)
await db.query(`ALTER TABLE "twin" ALTER COLUMN "ip" SET NOT NULL`)
await db.query(`ALTER TABLE "twin" DROP COLUMN "relay"`)
await db.query(`ALTER TABLE "twin" ADD "ip" text`)
await db.query(`ALTER TABLE "twin" DROP COLUMN "public_key"`)
await db.query(`ALTER TABLE "historical_balance" ADD CONSTRAINT "FK_383ff006e4b59db91d32cb891e9" FOREIGN KEY ("account_id") REFERENCES "account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`)
await db.query(`ALTER TABLE "historical_balance" ALTER COLUMN "account_id" SET NOT NULL`)
Expand Down
2 changes: 1 addition & 1 deletion indexer/chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: tfchainindexer
description: Helm Chart for the tfchain hydra indexer
version: 2.7.6
apiVersion: v2
appVersion: '2.9.0-rc1'
appVersion: '2.9.0-rc2'
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "graphql_tfgrid",
"private": "true",
"version": "2.9.0-rc1",
"version": "2.9.0-rc2",
"description": "GraphQL server and Substrate indexer. Generated with ♥ by Hydra-CLI",
"author": "",
"license": "ISC",
"scripts": {
"update": "npx npm-check-updates --filter /subsquid/ --upgrade && npm i -f",
"build": "rm -rf lib && tsc",
"db:create-migration": "sqd db create-migration",
"db:create-migration": "npx squid-typeorm-migration generate",
"db:migrate": "npx squid-typeorm-migration apply",
"db:init": "node init-countries.js",
"db:up": "docker-compose up -d db",
"process": "node db/init.js && node init-countries.js && node -r dotenv/config lib/processor.js",
"api": "squid-graphql-server",
"codegen": "sqd codegen",
"codegen": "npx squid-typeorm-codegen",
"typegen": "squid-substrate-typegen typegen/typegen.json",
"lint": "npm run lint:prod -- --fix",
"lint:prod": "eslint . --ext .ts --ignore-path .gitignore --max-warnings 0"
Expand Down Expand Up @@ -41,4 +42,4 @@
"@types/node": "16.11.47",
"typescript": "4.7.4"
}
}
}
2 changes: 1 addition & 1 deletion processor-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: tfchain-processor
description: A chart for the tfchain graphql processor and query node
version: 1.0.5
appVersion: '2.9.0-rc1'
appVersion: '2.9.0-rc2'

0 comments on commit 200e77e

Please sign in to comment.