Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add configuration flag to support migration from store/v1 -> store/v2 #22180

Open
kocubinski opened this issue Oct 9, 2024 · 1 comment

Comments

@kocubinski
Copy link
Member

Summary

There is no out of the box migration support from store/v1 -> store/v2 for a server/2 app.

Problem Definition

The store/v2 root store factory does not support migration manager set up, the argument is always set as nil.

return New(opts.Logger, ss, sc, pm, nil, nil)

Proposed Feature

Extend the store/v2/root.Config options with a boolean flag to enable migration if set.

type Config struct {
Home string `toml:"-"` // this field is omitted in the TOML file
AppDBBackend string `mapstructure:"app-db-backend" toml:"app-db-backend" comment:"The type of database for application and snapshots databases."`
Options Options `mapstructure:"options" toml:"options"`
}

This flag should be ignored in TOML, but settable from simapp/v2/app_di.go so that the feature is configuration is chain wide by default, not node specific.

@julienrbrt
Copy link
Member

From last API review call, it was said it would be nice to improve the migration UX by not requiring to turn on/set migrator manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants