2024-04-06 01:22:00 +07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-04-07 00:28:29 +07:00
|
|
|
"embed"
|
2024-04-06 01:22:00 +07:00
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/tigorlazuardi/redmage/cli"
|
2024-04-07 00:28:29 +07:00
|
|
|
"github.com/tigorlazuardi/redmage/db"
|
2024-04-06 01:22:00 +07:00
|
|
|
)
|
|
|
|
|
2024-04-07 00:28:29 +07:00
|
|
|
// go:embed db/migrations/*.sql
|
|
|
|
var migrations embed.FS
|
|
|
|
|
2024-04-06 01:22:00 +07:00
|
|
|
func main() {
|
2024-04-07 00:28:29 +07:00
|
|
|
db.Migrations = migrations
|
|
|
|
|
2024-04-06 01:22:00 +07:00
|
|
|
if err := cli.RootCmd.ExecuteContext(context.Background()); err != nil {
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|