You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: migrate.go
    path of file: ./repos/mattermost/server/config
    
    the code of the file until where you have to start completion: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for lice
    
func Migrate(from, to string) error {
	source, err := NewStoreFromDSN(from, false, nil, false)
	if err != nil {
		return errors.Wrapf(err, "failed to access source config %s", from)
	}
	defer source.Close()

	destination, err := NewStoreFromDSN(to, false, nil, true)
	if err != nil {
		return errors.Wrapf(err, "failed to access destination config %s", to)
	}
	defer destination.Close()

	sourceConfig := source.Get()
	if _, _, err = destination.Set(sourceConfig); err != nil {
		return errors.Wrapf(err, "failed to set config")
	}

	files := []string{
		*sourceConfig.SamlSettings.IdpCertificateFile,
		*sourceConfig.SamlSettings.PublicCertificateFile,
		*sourceConfig.SamlSettings.PrivateKeyFile,
	}

	// Only migrate advanced logging config if it is a filespec.
	dsn := sourceConfig.LogSettings.GetAdvancedLoggingConfig()
	cfgSource, err := NewLogConfigSrc(dsn, source)
	if err == nil && cfgSource.GetType() == LogConfigSrcTypeFile {
		files = append(files, string(dsn))
	}

	files = append(files, sourceConfig.PluginSettings.SignaturePublicKeyFiles...)

	for _, file := range files {
		if err := migrateFile(file, source, destination); err != nil {
			return err
		}
	}

	return nil
}