mirror of
https://github.com/Luzifer/go-latestver.git
synced 2024-11-09 23:50:05 +00:00
23 lines
457 B
Go
23 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"))
|
||
|
}
|
||
|
}
|