feat(core): add migrations registering (#19370)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
This commit is contained in:
co-authored by
Facundo Medica
parent
ac48269f98
commit
e15a0de251
@@ -39,17 +39,12 @@ type HasServices interface {
|
||||
RegisterServices(grpc.ServiceRegistrar) error
|
||||
}
|
||||
|
||||
// HasPrepareCheckState is an extension interface that contains information about the AppModule
|
||||
// and PrepareCheckState.
|
||||
type HasPrepareCheckState interface {
|
||||
// HasMigrations is the extension interface that modules should implement to register migrations.
|
||||
type HasMigrations interface {
|
||||
AppModule
|
||||
PrepareCheckState(context.Context) error
|
||||
}
|
||||
|
||||
// HasPrecommit is an extension interface that contains information about the AppModule and Precommit.
|
||||
type HasPrecommit interface {
|
||||
AppModule
|
||||
Precommit(context.Context) error
|
||||
// RegisterMigrations registers the module's migrations with the app's migrator.
|
||||
RegisterMigrations(MigrationRegistrar) error
|
||||
}
|
||||
|
||||
// ResponsePreBlock represents the response from the PreBlock method.
|
||||
@@ -100,3 +95,18 @@ type HasMsgHandler interface {
|
||||
// RegisterMsgHandlers is implemented by the module that will register msg handlers.
|
||||
RegisterMsgHandlers(router MsgHandlerRouter)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- //
|
||||
|
||||
// HasPrepareCheckState is an extension interface that contains information about the AppModule
|
||||
// and PrepareCheckState.
|
||||
type HasPrepareCheckState interface {
|
||||
AppModule
|
||||
PrepareCheckState(context.Context) error
|
||||
}
|
||||
|
||||
// HasPrecommit is an extension interface that contains information about the AppModule and Precommit.
|
||||
type HasPrecommit interface {
|
||||
AppModule
|
||||
Precommit(context.Context) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user