atlas

package module
v0.0.0-...-5a154c6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateApplyRun

func MigrateApplyRun(ctx context.Context, dirFrom, urlTo string) (err error)

atlas migrate apply --dir "file://path/to/migrations?format=golang-migrate" --url "mysql://..."

func MigrateDiffRun

func MigrateDiffRun(ctx context.Context, toURL, schemas []string, name, formatTo, dirURL, devURL, qualifier string) (err error)

atlas migrate diff test_name --dir "file://e:/test/atlas/migrations" --to "file://e:/test/atlas/test.sql" --dev-url "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/atlas_dev" --format '{{ sql . \" \" }}'

func SchemaDiffRun

func SchemaDiffRun(ctx context.Context, fromURL, toURL, schemas, exclude []string, formatTo, devURL string) (err error)

--format '{{ sql . }}' : 一行 sql ; --format '{{ sql . \" \" }}' : 转成多行,方便查看 ; atlas schema diff --from "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/dji1" --to "file://e:/test/atlas/test.sql" --format '{{ sql . \" \" }}' --dev-url "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/atlas_dev" atlas schema diff --from "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/dji1" --to "file://e:/test/atlas/test.sql" --format '{{ sql . }}' --dev-url "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/atlas_dev"

func SchemaInspectRun

func SchemaInspectRun(ctx context.Context, fromURL, schemas, exclude []string, formatTo, devURL string) (err error)

atlas schema inspect --from "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/dji1" --to "file://e:/test/atlas/test.sql" --format '{{ sql . \" \" }}' --dev-url "mysql://root:BdtEnxxTnoN1luUR@10.1.1.121:3306/atlas_dev"

Types

This section is empty.

Jump to

Keyboard shortcuts

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