func Migrate(connStr string, version int64) error {
	db, err := sql.Open("postgres", connStr)
	if err != nil {
		return err
	}
	defer db.Close()

	if version == 0 {
		migrations, err := goose.CollectMigrations(".", minVersion, maxVersion)
		if err != nil {
			return err
		}

		last, err := migrations.Last()
		if err != nil {
			return err
		}
		version = last.Version
	}

	return executeMigrationScripts(db, version)
}
func Migrate(connStr string, version int64) error {
	db, err := sql.Open("postgres", connStr)
	if err != nil {
		return err
	}
	defer db.Close()

	if version == 0 {
		migrations, err := goose.CollectMigrations(".", minVersion, maxVersion)
		if err != nil {
			return err
		}

		last, err := migrations.Last()
		if err != nil {
			return err
		}
		version = last.Version
	}

	return executeMigrationScripts(db, version)
}
func Migrate ( connStr string , version int64 ) error { db , err := sql . Open ( " " , connStr ) if err != nil { return err } defer db . Close ( ) if version == 0 { migrations , err := goose . CollectMigrations ( " " , minVersion , maxVersion ) if err != nil { return err } last , err := migrations . Last ( ) if err != nil { return err } version = last . Version } return executeMigrationScripts ( db , version ) }
// Migrate executes migration scripts.
Migrate executes migration scripts .