fix(pkg/db): create or upgrade postgres schema based on semver

This commit is contained in:
2019-09-01 12:27:06 +02:00
parent f19cc3249a
commit 6223f4e79b
21 changed files with 301 additions and 91 deletions

View File

@ -4,12 +4,17 @@ import (
"context"
"log"
"github.com/Masterminds/semver"
database "github.com/go-flucky/flucky/pkg/db"
"github.com/go-flucky/flucky/pkg/types"
"github.com/spf13/cobra"
)
var configFile *string
var (
configFile *string
version *semver.Version
)
var dbCmd = &cobra.Command{
Use: "db",
@ -41,8 +46,9 @@ var dbCmd = &cobra.Command{
}
// Execute a
func InitCmd(cmd *cobra.Command, cnfFile *string) {
func InitCmd(cmd *cobra.Command, cnfFile *string, sversion *semver.Version) {
configFile = cnfFile
version = sversion
cmd.AddCommand(dbCmd)