Help us shape the future of Go! Take the 2026 Go Developer Survey

atlas

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package atlas provides a MigrationDriver backed by ariga.io/atlas v1. Atlas uses versioned SQL migration files with an atlas.sum integrity file. If atlas.sum is absent the driver auto-generates it so users don't need the Atlas CLI installed for basic up/down/status operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct{}

Driver implements interfaces.MigrationDriver using ariga.io/atlas.

func New

func New() *Driver

New returns a new Atlas Driver.

func (*Driver) Down

Down rolls back N migrations (Options.Steps, default 1). Atlas versioned migrations do not include rollback SQL natively; this driver looks for paired <version>_<desc>.down.sql files alongside the up migration files.

func (*Driver) Goto

Goto migrates to the specified version (up or down as needed).

func (*Driver) Name

func (d *Driver) Name() string

Name returns the driver name used in plugin configuration.

func (*Driver) Status

Status returns the current migration state.

func (*Driver) Up

Up applies all pending migrations.

Jump to

Keyboard shortcuts

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