mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-01 03:00:37 -04:00
fix: postgres bulk insert issue (#1780)
Co-authored-by: georgehao <georgehao@users.noreply.github.com>
This commit is contained in:
@@ -51,7 +51,8 @@ func InitDB(config *Config) (*gorm.DB, error) {
|
||||
}
|
||||
|
||||
db, err := gorm.Open(postgres.Open(config.DSN), &gorm.Config{
|
||||
Logger: &tmpGormLogger,
|
||||
CreateBatchSize: 1000,
|
||||
Logger: &tmpGormLogger,
|
||||
NowFunc: func() time.Time {
|
||||
// why set time to UTC.
|
||||
// if now set this, the inserted data time will use local timezone. like 2023-07-18 18:24:00 CST+8
|
||||
|
||||
Reference in New Issue
Block a user