leafeon

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

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 6 Imported by: 0

README ¶

Leafeon

A Wrapper around gorm for migrations

Still a work in progress

🚀 Dependencies

  • gorm
  • go 1.18

How to use

-Import import into you project and reference github.com/dwakel/leafeon/migrator

-Can also use with terminal to run migrations

    go run leafeon.go -connstr="host=localhost port=5432 user=postgres password=dbpassword dbname=dbname sslmode=disable" -src="./migrations" up
    go run leafeon.go -connstr="host=localhost port=5432 user=postgres password=dbpassword dbname=dbname sslmode=disable" -src="./migrations" down

Replace -connstr with your connection string and -src with the path to you directory containing migrations files

Naming conventions
  • Up migrations should be named {filename}.up.sql
  • Rollback migrations should be named {filename}.down.sql

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