Reorganize cmd init functions

This commit is contained in:
kolaente 2020-06-13 19:44:45 +02:00
parent d9d00ba60c
commit f5e44d9eb3
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
4 changed files with 22 additions and 7 deletions

View file

@ -35,6 +35,9 @@ func init() {
var migrateCmd = &cobra.Command{
Use: "migrate",
Short: "Run all database migrations which didn't already run.",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
lightInit()
},
Run: func(cmd *cobra.Command, args []string) {
migration.Migrate(nil)
},