Movatterモバイル変換


[0]ホーム

URL:


migrations

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:18Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcCheckLatestVersion

func CheckLatestVersion(sourceDriversource.Driver, currentVersionuint)error

Returns nil if currentVersion corresponds to the latest available migration,otherwise an error explaining why not.

funcDown

func Down(db *sql.DB)error

Down runs all down SQL migrations.

funcEnsureClean

func EnsureClean(db *sql.DB)error

EnsureClean checks whether all migrations for the current version have beenapplied, without making any changes to the database. If not, returns anon-nil error.

funcGetMigrationsHashadded inv2.18.0

func GetMigrationsHash()string

funcStepper

func Stepper(db *sql.DB) (next func() (versionuint, morebool, errerror), errerror)

Stepper returns a function that runs SQL migrations one step at a time.

Stepper cannot be closed pre-emptively, it must be run to completion(or until an error is encountered).

funcUp

func Up(db *sql.DB)error

Up runs SQL migrations to ensure the database schema is up-to-date.

funcUpWithFSadded inv2.11.0

func UpWithFS(db *sql.DB, migsfs.FS) (retErrerror)

UpWithFS runs SQL migrations in the given fs.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp