merge: config + store(UTC DSN) + 自动迁移 [tsk_zRA6fGU1JuHj]
以 main 现有 config 设计为准(FromEnv/*Config/单 DSN/RS256),移植分支新增的 store 层:mysql.go 的 Open(*config.Config) 改用 cfg.DSN、结构化强制 UTC + 会话时区断言;migrate.go + migrations/embed.go 提供 golang-migrate 嵌入式迁移;cmd/migrate/main.go 实现 migrate CLI(读 DB_DSN)。未采用分支的 Load()/PANGOLIN_ 前缀/MySQL 拆分字段(与 main 设计冲突)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Package migrations provides the embedded SQL migration files for golang-migrate.
|
||||
// Files are named in the golang-migrate convention:
|
||||
//
|
||||
// {version}_{title}.up.sql
|
||||
// {version}_{title}.down.sql
|
||||
//
|
||||
// The FS is consumed by internal/store.MigrateUp / MigrateDown.
|
||||
package migrations
|
||||
|
||||
import "embed"
|
||||
|
||||
// FS contains all *.sql files in this directory, embedded at compile time.
|
||||
//
|
||||
//go:embed *.sql
|
||||
var FS embed.FS
|
||||
Reference in New Issue
Block a user