Closed kamsz closed 2 years ago
I think your SQL database is corrupted or not migrated for some reason. Since we are /v1/wasm endpoint dependencies from all of our apps. I think you can safely remove non null constraint from the wasm_contract scheme. ALTER TABLE wasm_contract ALTER COLUMN code_id DROP NOT NULL;
@hanjukim not sure if that's safe sadly, after few days fcd api starts failing with:
8
QueryFailedError: column "code_id" contains null values
37
at QueryFailedError.TypeORMError [as constructor] (/fcd/src/error/TypeORMError.ts:7:9)
36
at new QueryFailedError (/fcd/src/error/QueryFailedError.ts:9:9)
35
at PostgresQueryRunner.<anonymous> (/fcd/src/driver/postgres/PostgresQueryRunner.ts:247:19)
34
at step (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:143:27)
33
at Object.throw (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)
32
at rejected (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:115:69)
31
at processImmediate (node:internal/timers:464:21)
30
From previous event:
29
at __awaiter (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:113:16)
28
at PostgresQueryRunner.changeColumns (/fcd/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:1358:38)
27
at /fcd/src/schema-builder/RdbmsSchemaBuilder.ts:635:36
26
at step (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:143:27)
25
at Object.next (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)
24
at step (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:128:143)
23
at Object.next (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)
22
at fulfilled (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:114:62)
21
From previous event:
20
at step (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:116:95)
19
at /fcd/node_modules/typeorm/node_modules/tslib/tslib.js:117:13
18
From previous event:
17
at __awaiter (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:113:16)
16
at RdbmsSchemaBuilder.updateExistColumns (/fcd/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js:1184:38)
15
at RdbmsSchemaBuilder.<anonymous> (/fcd/src/schema-builder/RdbmsSchemaBuilder.ts:187:20)
14
at step (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:143:27)
13
at Object.next (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)
12
at fulfilled (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:114:62)
11
From previous event:
10
at step (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:116:95)
9
at /fcd/node_modules/typeorm/node_modules/tslib/tslib.js:117:13
8
From previous event:
7
at __awaiter (/fcd/node_modules/typeorm/node_modules/tslib/tslib.js:113:16)
6
at createConnection (/fcd/node_modules/typeorm/globals.js:55:34)
5
at initConnection (/fcd/src/orm/index.ts:108:26)
4
at processImmediate (node:internal/timers:464:21)
3
From previous event:
2
at init (/fcd/src/orm/index.ts:148:21)
1
at async createServer (/fcd/src/server.ts:29:3)
while running a code from bombay branch on bombay network: