From 9e5a95a0f25d404814c6db7c53265106654bc28d Mon Sep 17 00:00:00 2001 From: Daniel Oviedo Date: Tue, 27 Apr 2021 17:41:14 -0500 Subject: [PATCH] Update README.md file --- README.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8d9ff94..f9a6404 100644 --- a/README.md +++ b/README.md @@ -3,21 +3,22 @@ Liquo is an experimental Liquibase plugin for oxpecker. It's aimed to make the development of Buffalo apps with Liquibase migrations a bit more easy but avoiding the installation of Java tools for the development workflow. ## Installation -Liquo is provided as a library you can pull it with +Liquo is provided as a library you can pull with ``` go get github.com/wawandco/liquo ``` -An then in your cmd/ox/main.go use it by appending it to the CLi plugins. +An then in your `cmd/ox/main.go` use it by appending it to the CLI plugins. ``` ... -cl.Plugins = append(cl.Plugins, liquo.Plugins()...) +cli.Remove("pop/generate-migration") // make sure pop plugin is not being used +cli.Use(liquo.Plugins()...) ... ``` -## Limited Functionallity +## Limited Functionality Liquo still experimental, it does not provide the same amount of statements, formats or databases that liquibase supports. @@ -29,6 +30,26 @@ Liquo ONLY supports: - rollback While is possible to add the rest of statements this is where the tool is at the moment. +## Usage +Generate migration file in `./migrations` default directory: +- `ox generate migration create-users-table` + +Generate migration file in `./my/directory` directory: +- `ox generate migration ./my/directory/create-users-table` + +Run migrations: +- `ox db migrate` + +Run one single migration: +- `ox db migrate up` + +Rollback one single migration: +- `ox db migrate down` + +Usage notes: +1. Generating a migration file auto-adds the import path in the `changelog.xml` file. +2. If no `--conn` flag is provided, liquo assumes `development` as its standard DB connection. + ## License Liquo is released under the [MIT License](LICENSE). \ No newline at end of file