Skip to content

Commit

Permalink
add a new message after downgrade (#1538)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolopinto authored Jul 12, 2023
1 parent 30fd53f commit 44ec739
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tsent/cmd/downgrade.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cmd

import (
"fmt"

"github.com/lolopinto/ent/internal/build_info"
"github.com/lolopinto/ent/internal/codegen"
"github.com/lolopinto/ent/internal/db"
Expand Down Expand Up @@ -45,6 +47,11 @@ tsent downgrade rev2a@rev1`,
if err := db.DowngradeDB(cfg, args[0], downgradeInfo.keepSchemaFiles); err != nil {
return err
}
return build_info.FlagNextBuildInfoAsWriteAll(cfg, cfg)
if err := build_info.FlagNextBuildInfoAsWriteAll(cfg, cfg); err != nil {
return err
}

fmt.Println("database downgraded successfully. don't forget to undo any changes to your schema files. e.g. `git checkout src/schema` and run codegen again if needed to change other generated files")
return nil
},
}

0 comments on commit 44ec739

Please sign in to comment.