From 6429417c403c6c6b7d904bb65ba4ee17fbc16e32 Mon Sep 17 00:00:00 2001 From: lirui Date: Wed, 14 Jun 2023 15:31:47 +0800 Subject: [PATCH] fix(data): bufio.Scanner: token too long --- collection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collection.go b/collection.go index 29c8d99..289cc75 100644 --- a/collection.go +++ b/collection.go @@ -275,6 +275,8 @@ func newSQLMigration(fs http.FileSystem, filePath string) func(DB) error { defer f.Close() scanner := bufio.NewScanner(f) + buf := make([]byte, 0, 64*1024) + scanner.Buffer(buf, 1024*1024) var query []byte var queries []string