go-pg / migrations

SQL database migrations for Golang go-pg and PostgreSQL
https://godoc.org/github.com/go-pg/migrations
BSD 2-Clause "Simplified" License
309 stars 59 forks source link

added method DiscoverSQLMigrationsFromFilesystem #69

Closed smcdonald45 closed 5 years ago

smcdonald45 commented 5 years ago

In our project we are using vfsgen for embed static content like go templates and database migrations. Unfortunately go-pg migrations only supports the os filesystem and the files have to exist on production systems. We took a look around for other migration frameworks but decided to add the vfs feature to go-pg because its already running and we also like to work with the orm.

Changes:

In the testcase you can see some generated code by vfsgen which is used for discover the SQL.

Thanks in advance, Stephan

Terminator637 commented 5 years ago

@vmihailenco, @smcdonald45, I think this could fix my problem #73, who can merge it?

vmihailenco commented 5 years ago

Thanks - this looks good. I will try to merge this tomorrow. Sorry for delay.