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

@ -1,10 +1,15 @@
package sensor
import (
"github.com/Masterminds/semver"
"github.com/spf13/cobra"
)
var configFile *string
var (
configFile *string
version *semver.Version
)
var sensorCmd = &cobra.Command{
Use: "sensor",
@ -12,8 +17,9 @@ var sensorCmd = &cobra.Command{
}
// InitCmd da
func InitCmd(cmd *cobra.Command, cnfFile *string) {
func InitCmd(cmd *cobra.Command, cnfFile *string, sversion *semver.Version) {
configFile = cnfFile
version = sversion
cmd.AddCommand(sensorCmd)