From db2d39bc4ef13b1eb886be1a847bb424cde6ba24 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Mon, 15 Jan 2024 14:59:37 +0800 Subject: [PATCH] fix gorm id field --- rollup/internal/orm/transaction.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup/internal/orm/transaction.go b/rollup/internal/orm/transaction.go index b69728dfb9..088e24a555 100644 --- a/rollup/internal/orm/transaction.go +++ b/rollup/internal/orm/transaction.go @@ -25,7 +25,7 @@ type SenderMeta struct { type Transaction struct { db *gorm.DB `gorm:"column:-"` - ID uint `json:"id" gorm:"primaryKey"` + ID uint `json:"id" gorm:"id;primaryKey"` ContextID string `json:"context_id" gorm:"context_id"` Hash string `json:"hash" gorm:"hash"` Type uint8 `json:"type" gorm:"type"`