migrate

package
v0.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package migrate applies forward-only core schema migrations recorded in schema_migrations_core. Production deployments must run cmd/migrate rather than relying on GORM AutoMigrate-on-connect.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Up

func Up(db *gorm.DB) error

Up applies all pending migrations against the given DB.

func UpFromDefault

func UpFromDefault() error

UpFromDefault connects via postgres package and runs Up.

Types

type Migration

type Migration struct {
	Version string
	Name    string
	Apply   func(db *gorm.DB) error
}

Migration is a single forward-only schema step.

func Migrations

func Migrations() []Migration

Migrations returns the ordered core migration list.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL