Documentation
¶
Overview ¶
Package migration provides Goose-backed PostgreSQL schema migration helpers. Package migration 提供基于 Goose 的 PostgreSQL schema 迁移辅助函数。
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSchemaAhead reports that the database was migrated beyond the available sources. // ErrSchemaAhead 表示数据库版本高于当前可用的迁移源。 ErrSchemaAhead = errors.New("database schema is newer than available migrations") // ErrSchemaBehind reports that migrations remain unapplied. // ErrSchemaBehind 表示仍有迁移尚未应用。 ErrSchemaBehind = errors.New("database schema migrations are pending") )
Functions ¶
Types ¶
type Config ¶
Config configures Run and RequireCurrent. DB remains owned by the caller. A zero LockID uses Goose's default PostgreSQL advisory lock ID. Config 配置 Run 和 RequireCurrent。DB 的生命周期仍由调用方管理。 LockID 为零时使用 Goose 默认的 PostgreSQL advisory lock ID。
Click to show internal directories.
Click to hide internal directories.