// AutoMigrateAll runs migrations for all the registered models
AutoMigrateAll runs migrations for all the registered models
// AutoMigrateAll runs migrations for all the registered models
func (m *Model) AutoMigrateAll() error {
	if m.Migrate {
		for _, v := range m.models {
			err := m.CreateModel(v.Interface())
			if err != nil {
				fmt.Println("Error", err)
				return err
			}
		}
	}
	return nil
}
func ( m * Model ) AutoMigrateAll ( ) error { if m . Migrate { for _ , v := range m . models { err := m . CreateModel ( v . Interface ( ) ) if err != nil { fmt . Println ( " " , err ) return err } } } return nil }
AutoMigrateAll runs migrations for all the registered models
AutoMigrateAll runs migrations for all the registered models