db/debug/debug_sync.go

23 lines
303 B
Go
Raw Permalink Normal View History

2026-06-05 08:39:33 +08:00
package main
import (
"fmt"
"apigo.cc/go/db"
)
func main() {
dbPath := "debug.db"
dbInst := db.GetDB("sqlite://"+dbPath, nil)
schema := `
== System ==
_Table SD
id c10 PK
name v64 U
`
fmt.Println("First sync...")
dbInst.Sync(schema)
fmt.Println("\nSecond sync...")
dbInst.Sync(schema)
}