You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"select journal_mode as j, page_size as p, auto_vacuum as a, encoding as e from pragma_journal_mode, pragma_page_size, pragma_auto_vacuum, pragma_encoding;").CombinedOutput()
214
+
iferr!=nil {
215
+
returnfmt.Errorf("failed to check database settings: %w", err)
216
+
}
217
+
218
+
settings:=string(output)
219
+
if!strings.Contains(settings, "j = wal") {
220
+
returnfmt.Errorf("database is not in WAL mode. Set it with 'sqlite3 %s 'PRAGMA journal_mode = WAL'", file)
221
+
}
222
+
223
+
if!strings.Contains(settings, "p = 4096") {
224
+
returnfmt.Errorf("database must use 4KB page size. you can set it with 'sqlite3 %s 'PRAGMA page_size = 4096; VACUUM;' Note that this is not possible to do if your database is already in WAL mode", file)
225
+
}
226
+
if!strings.Contains(settings, "a = 0") {
227
+
returnfmt.Errorf("database must have autovacuum disabled. you can set it with 'sqlite3 %s 'PRAGMA auto_vacuum = 0;'", file)
228
+
}
229
+
if!strings.Contains(settings, "e = UTF-8") {
230
+
returnfmt.Errorf("database must use UTF-8 encoding. you can set it with 'sqlite3 %s 'PRAGMA encoding = 'UTF-8' ", file)
0 commit comments