migrate

command module
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 13 Imported by: 0

README

= migrate.

== Link
:hide-uri-scheme:
If you have questions about this application, there was a bug or there are suggestions for improvement, then you can ask it in Issues, or in link:telegram[https://t.me/zergsLaw]

== Migration cli.

Thin and lightweight client for performing migrations supports commands for migrations and their rollback.

[source]
----
USAGE:
   migrate command [command options] [arguments...]
----

== Install.

----
GO111MODULE=on go get github.com/Meat-Hook/migrate
----

=== Basic commands.

[source]
----
COMMANDS:
   version  get version
   run      exec migrate
   create   create migrate file
   help, h  Shows a list of commands or help for one command
----

== Creating a migration file.

[source]
----
USAGE:
    migrate create [command options]

OPTIONS:
   --migrate-name value, -M value  migration file name
   --dir value, -D value           migration file location
   --help, -h                      show help (default: false)
----

== Example:

[source,bash]
----
// Also note that there are many default parameters for a convenient start.
migrate create --dir migrates --migrate-name create_user_table
// Up migrate
migrate run --opration up --dir migrates --dsn <dsn>
// Rollback all migrates
migrate run --opration reset --dir migrates --dsn <dsn>
----

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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