mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
add error message column for invalid transaction
This commit is contained in:
parent
00a6e861ef
commit
3d245dc3af
@ -0,0 +1,13 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from 'typeorm'
|
||||
|
||||
@Entity('invalid_transactions')
|
||||
export class InvalidTransaction extends BaseEntity {
|
||||
@PrimaryGeneratedColumn('increment', { unsigned: true, type: 'bigint' })
|
||||
id: number
|
||||
|
||||
@Column({ name: 'iota_message_id', type: 'binary', length: 32 })
|
||||
iotaMessageId: Buffer
|
||||
|
||||
@Column({ name: 'error_message', type: 'varchar', length: 255 })
|
||||
errorMessage: string
|
||||
}
|
||||
@ -1 +1 @@
|
||||
export { InvalidTransaction } from './0001-init_db/InvalidTransaction'
|
||||
export { InvalidTransaction } from './0003-refactor_transaction_recipe/InvalidTransaction'
|
||||
|
||||
@ -26,6 +26,10 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
`ALTER TABLE \`accounts\` MODIFY COLUMN \`balance_confirmed_at_date\` datetime NULL DEFAULT NULL;`,
|
||||
)
|
||||
|
||||
await queryFn(
|
||||
`ALTER TABLE \`invalid_transactions\` ADD COLUMN \`error_message\` varchar(255) NOT NULL;`,
|
||||
)
|
||||
|
||||
await queryFn(
|
||||
`CREATE TABLE \`transactions\` (
|
||||
\`id\` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
@ -121,6 +125,7 @@ export async function downgrade(queryFn: (query: string, values?: any[]) => Prom
|
||||
)
|
||||
await queryFn(`ALTER TABLE \`accounts\` DROP COLUMN \`balance_created_at\`;`)
|
||||
await queryFn(`ALTER TABLE \`accounts\` DROP COLUMN \`balance_created_at_date\`;`)
|
||||
await queryFn(`ALTER TABLE \`invalid_transactions\` DROP COLUMN \`error_message\`;`)
|
||||
await queryFn(`DROP TABLE \`transactions\`;`)
|
||||
|
||||
await queryFn(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user