Documentation
¶
Index ¶
- func MigrateApplyRun(ctx context.Context, dirFrom, urlTo string) (err error)
- func MigrateDiffRun(ctx context.Context, toURL, schemas []string, ...) (err error)
- func SchemaDiffRun(ctx context.Context, fromURL, toURL, schemas, exclude []string, ...) (err error)
- func SchemaInspectRun(ctx context.Context, fromURL, schemas, exclude []string, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateApplyRun ¶
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.