Skip to content

Commit

Permalink
chore: reorder migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Nov 8, 2024
1 parent d513314 commit 2d3e66e
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ require (
github.com/onsi/gomega v1.34.2
github.com/ory/dockertest/v3 v3.11.0
github.com/pborman/uuid v1.2.1
github.com/pkg/errors v0.9.1
github.com/shomali11/xsql v0.0.0-20190608141458-bf76292144df
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand All @@ -54,6 +53,7 @@ require gopkg.in/yaml.v3 v3.0.1 // indirect
require (
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/jackc/pgxlisten v0.0.0-20241005155529-9d952acd6a6c // indirect
github.com/pkg/errors v0.9.1 // indirect
)

require (
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ledger/controller_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (ctrl *DefaultController) Export(ctx context.Context, w ExportWriter) error
}

func (ctrl *DefaultController) IsDatabaseUpToDate(ctx context.Context) (bool, error) {
return ctrl.store.IsUpToDate(ctx)
return ctrl.store.HasMinimalVersion(ctx)
}

func (ctrl *DefaultController) GetVolumesWithBalances(ctx context.Context, q GetVolumesWithBalancesQuery) (*bunpaginate.Cursor[ledger.VolumesWithBalanceByAssetByAccount], error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ledger/controller_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func TestIsDatabaseUpToDate(t *testing.T) {
ctx := logging.TestingContext()

store.EXPECT().
IsUpToDate(gomock.Any()).
HasMinimalVersion(gomock.Any()).
Return(true, nil)

l := NewDefaultController(ledger.Ledger{}, store, parser)
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ledger/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type Store interface {
GetAccount(ctx context.Context, q GetAccountQuery) (*ledger.Account, error)
GetAggregatedBalances(ctx context.Context, q GetAggregatedBalanceQuery) (ledger.BalancesByAssets, error)
GetVolumesWithBalances(ctx context.Context, q GetVolumesWithBalancesQuery) (*bunpaginate.Cursor[ledger.VolumesWithBalanceByAssetByAccount], error)
IsUpToDate(ctx context.Context) (bool, error)
HasMinimalVersion(ctx context.Context) (bool, error)
GetMigrationsInfo(ctx context.Context) ([]migrations.Info, error)
}

Expand Down
12 changes: 6 additions & 6 deletions internal/controller/ledger/store_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d3e66e

Please sign in to comment.