Documentation
¶
Overview ¶
Package msmigrate implements sqlmigrate.Migrator for Microsoft SQL Server using database/sql with github.com/microsoft/go-mssqldb.
db, err := sql.Open("sqlserver", "sqlserver://user:pass@host:1433?database=mydb")
conn, err := db.Conn(ctx)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migrator ¶
Migrator implements sqlmigrate.Migrator using a *sql.Conn with SQL Server.
func New ¶
New creates a Migrator from the given connection. Use db.Conn(ctx) to obtain a *sql.Conn from a *sql.DB.
func (*Migrator) Applied ¶
Applied returns all applied migrations from the _migrations table. Returns an empty slice if the table does not exist (SQL Server error 208).
The table-missing check is applied at both Query and rows.Err — some drivers may surface the error lazily after iteration begins.