Skip to content

Go migration file template #793

@greeflas

Description

@greeflas

Hi 👋
Thank you for this lib - it's awesome!

I have a question.
Is it possible to customise Go migration file?

For example I want to have following template, can I configure it somehow?

package migrations

import (
	"context"
	"fmt"

	"github.com/uptrace/bun"
)

func init() {
	Migrations.MustRegister(func(ctx context.Context, db *bun.DB) error {
		_, err := db.Exec(``)
		return err
	}, nil)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions