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: 1701496825_allow_single_oauth2_provider_in_multiple_auth_collections.go
    path of file: ./repos/pocketbase/migrations
    
    the code of the file until where you have to start completion: package migrations

import (
	"github.com/pocketbase/dbx"
)

// Fixes the unique _externalAuths constraint for old installations
// to allow a single OAuth2 provider to be registered for different auth collections.
func init() {
	AppMigrations.Register(func(db dbx.Builder) erro
    
func init() {
	AppMigrations.Register(func(db dbx.Builder) error {
		_, createErr := db.NewQuery("CREATE UNIQUE INDEX IF NOT EXISTS _externalAuths_collection_provider_idx on {{_externalAuths}} ([[collectionId]], [[provider]], [[providerId]])").Execute()
		if createErr != nil {
			return createErr
		}

		_, dropErr := db.NewQuery("DROP INDEX IF EXISTS _externalAuths_provider_providerId_idx").Execute()
		if dropErr != nil {
			return dropErr
		}

		return nil
	}, nil)
}