migrate icon indicating copy to clipboard operation
migrate copied to clipboard

some questions about the use of the library,

Open gspgsp opened this issue 2 years ago • 0 comments

I have some questions about the use of the library, why there is no documentation on the use of the library and the corresponding demos, only the documentation in cli mode, basically all the help documentation ends up jumping to the cli mode. I only see one relevant operation: func MigrateTables() { m, err := migrate.New( "github://mattes:personal-access-token@mattes/migrate_test", "mysql://root:[email protected]:3306/test?charset=utf8mb4&parseTime=true&loc=Local") err = m.Steps(2) if err ! = nil { panic(err) } } This runs without migrating the table.

I'm wondering if I want to create a local migrations file, can the up/down sql in this be generated via library, or do I have to write it by hand, or generate it via cli's migrate.

If I have an up/down file under migrations now, how do I introduce the sourceUrl via migrate.New.

note: go1.20.5

gspgsp avatar Jul 20 '23 01:07 gspgsp