Skip to content

Commit

Permalink
fix: clean up migration messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Aug 5, 2024
1 parent 7ffacbc commit 268bed3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions core/migrations/0001_sqlite_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ func Up0001(c *sqlite.Client) error {
return err
}

// Moved user creation to 0006_sqlite_settings.go

return nil
}

Expand Down
4 changes: 2 additions & 2 deletions core/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (s *Service) AutoMigrate(ctx context.Context) error {
id := typeid.String()

// Hash default password
auth, err := util.NewAuthService(context.Background(), false)
auth, err := util.NewAuthService(ctx, false)
if err != nil {
return err
}
Expand All @@ -193,7 +193,7 @@ func (s *Service) AutoMigrate(ctx context.Context) error {

dateCreated := time.Now().Unix()
dateUpdated := dateCreated
err = s.sqlite.CreateUser(context.Background(), model.NewUser(id, "admin", pwdHash, model.NewDefaultSettings(), dateCreated, dateUpdated))
err = s.sqlite.CreateUser(ctx, model.NewUser(id, "admin", pwdHash, model.NewDefaultSettings(), dateCreated, dateUpdated))
if err != nil {
return err
}
Expand Down

0 comments on commit 268bed3

Please sign in to comment.