mirror of
https://github.com/Luzifer/go-latestver.git
synced 2024-11-14 01:42:41 +00:00
22 lines
457 B
Go
22 lines
457 B
Go
package main
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
|
|
"github.com/Luzifer/go-latestver/internal/database"
|
|
)
|
|
|
|
func main() {
|
|
src, err := database.NewClient("sqlite", "")
|
|
if err != nil {
|
|
panic(errors.Wrap(err, "opening src database"))
|
|
}
|
|
dest, err := database.NewClient("mysql", "")
|
|
if err != nil {
|
|
panic(errors.Wrap(err, "opening dest database"))
|
|
}
|
|
|
|
if err := src.Migrate(dest); err != nil {
|
|
panic(errors.Wrap(err, "migrating to dest database"))
|
|
}
|
|
}
|