mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-25 06:15:56 +01:00
20 lines
352 B
Go
20 lines
352 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
rootCmd.AddCommand(migrateCmd)
|
||
|
}
|
||
|
|
||
|
var migrateCmd = &cobra.Command{
|
||
|
Use: "migrate",
|
||
|
Short: "Execute migrations",
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
store := createStore()
|
||
|
defer store.Close()
|
||
|
fmt.Println("\n DB migrations run on startup automatically")
|
||
|
},
|
||
|
}
|