hmn/src/migration/migrationTemplate.txt

36 lines
579 B
Plaintext

package migrations
import (
"context"
"time"
"git.handmade.network/hmn/hmn/src/migration/types"
"github.com/jackc/pgx/v5"
)
func init() {
registerMigration(%NAME%{})
}
type %NAME% struct{}
func (m %NAME%) Version() types.MigrationVersion {
return types.MigrationVersion(%DATE%)
}
func (m %NAME%) Name() string {
return "%NAME%"
}
func (m %NAME%) Description() string {
return %DESCRIPTION%
}
func (m %NAME%) Up(ctx context.Context, tx pgx.Tx) error {
panic("Implement me")
}
func (m %NAME%) Down(ctx context.Context, tx pgx.Tx) error {
panic("Implement me")
}