fizz icon indicating copy to clipboard operation
fizz copied to clipboard

Proposal: Move Migration/Schema Tools out of Pop to Fizz

Open markbates opened this issue 6 years ago • 1 comments

Currently the migration and schema management tools are tied tightly to gobuffalo/pop. I feel as though these tools, representing a bulk of the soda command should be moved to gobuffalo/fizz.

These rebuilt tools can be used by Pop, Gorm, etc... independently. These tools should strive to use only the std lib sql package. If that's not easily do-able, then sqlx will be allowed, but nothing else beyond that.

In addition to allowing projects, such as Pop and Buffalo, to continue using these tools, we can make them available to the wider Go community as whole who need things like migrations, but don't want to use something such as Pop.

Related: https://github.com/gobuffalo/pop/issues/154

markbates avatar Jun 30 '18 16:06 markbates

I realize this ticket is almost 2 years old, but this could be accomplished by running something like this:

import "github.com/gobuffalo/pop"

migr, _ := pop.NewFileMigrator("./migrations", conn)
migr.Up()

or does this gloss over something I'm not seeing?

(I'd also like to see the migration/schema stuff moved into Fizz, FWIW.)

greggilbert avatar Apr 03 '20 21:04 greggilbert