migrate

command module
v0.0.0-...-b005dc2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: BSD-2-Clause Imports: 12 Imported by: 0

README

Bun migrations example

To run migrations:

BUNDEBUG=2 go run . db migrate

To rollback migrations:

go run . db rollback

To view status of migrations:

go run . db status

To create a Go migration:

go run . db create_go go_migration_name

To create a SQL migration:

go run . db create_sql sql_migration_name

To get help:

go run . db

NAME:
   bun db - database commands

USAGE:
   bun db command [command options] [arguments...]

COMMANDS:
   init        create migration tables
   migrate     migrate database
   rollback    rollback the last migration group
   unlock      unlock migrations
   create_go   create a Go migration
   create_sql  create a SQL migration
   help, h     Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help (default: false)

See docs for details.

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