diff --git a/structs/storage/provider.go b/structs/storage/provider.go index f4987a9..631b7fb 100644 --- a/structs/storage/provider.go +++ b/structs/storage/provider.go @@ -17,6 +17,7 @@ type ProviderApi interface { Create(provider v2.Provider) error Update(provider v2.Provider) error Delete(id uint) (provider v2.Provider, err error) + AutoMigrate() error } func NewProviderApi(db *gorm.DB) ProviderApi { @@ -100,3 +101,7 @@ func (p *providerApi) Delete(id uint) (provider v2.Provider, err error) { }) return } + +func (p *providerApi) AutoMigrate() error { + return p.db.AutoMigrate(&v2.Provider{}, &v2.CalculateProcess{}) +}