Go migration file template #795
-
Hi 👋 I have a question. 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)
} |
Beta Was this translation helpful? Give feedback.
Answered by
vmihailenco
Mar 5, 2023
Replies: 2 comments
-
You can't customize Go migrations, but you can send a PR to make it possible - see https://github.com/uptrace/bun/blob/master/migrate/migration.go#L124-L142 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
greeflas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can't customize Go migrations, but you can send a PR to make it possible - see https://github.com/uptrace/bun/blob/master/migrate/migration.go#L124-L142