Documentation
¶
Overview ¶
Package migrate implements Palma's PostgreSQL SQL-file migration tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type State ¶
func Run ¶
func Run(ctx context.Context, db *sql.DB, files []Migration, action string, steps int) (states []State, err error)
Run serializes migration operations on a dedicated PostgreSQL session. Up steps=0 applies all pending files; down steps must be positive. Each file and its history record commit together; earlier successful files remain committed if a later file fails. Status never creates the history table.
Click to show internal directories.
Click to hide internal directories.