diff --git a/dlt-database/entity/0003-refactor_transaction_recipe/BackendTransaction.ts b/dlt-database/entity/0003-refactor_transaction_recipe/BackendTransaction.ts index 89dd3dbb0..c84a15f41 100644 --- a/dlt-database/entity/0003-refactor_transaction_recipe/BackendTransaction.ts +++ b/dlt-database/entity/0003-refactor_transaction_recipe/BackendTransaction.ts @@ -14,10 +14,10 @@ export class BackendTransaction extends BaseEntity { @ManyToOne(() => Transaction, (transaction) => transaction.backendTransactions) @JoinColumn({ name: 'transaction_id' }) - transaction?: Transaction + transaction: Transaction - @Column({ name: 'transaction_id', type: 'bigint', unsigned: true, nullable: true }) - transactionId?: number + @Column({ name: 'transaction_id', type: 'bigint', unsigned: true }) + transactionId: number @Column({ name: 'type_id', unsigned: true, nullable: false }) typeId: number diff --git a/dlt-database/migrations/0003-refactor_transaction_recipe.ts b/dlt-database/migrations/0003-refactor_transaction_recipe.ts index ac427cd21..0c022cc42 100644 --- a/dlt-database/migrations/0003-refactor_transaction_recipe.ts +++ b/dlt-database/migrations/0003-refactor_transaction_recipe.ts @@ -65,7 +65,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis `CREATE TABLE \`backend_transactions\` ( \`id\` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, \`backend_transaction_id\` BIGINT UNSIGNED NOT NULL, - \`transaction_id\` BIGINT UNSIGNED NULL DEFAULT NULL, + \`transaction_id\` BIGINT UNSIGNED NOT NULL, \`type_id\` INT UNSIGNED NOT NULL, \`balance\` DECIMAL(40, 20) NULL DEFAULT NULL, \`created_at\` DATETIME(3) NOT NULL,