0002_webhooks.go
 1package migrate
 2
 3import (
 4	"context"
 5
 6	"github.com/charmbracelet/soft-serve/server/db"
 7)
 8
 9const (
10	webhooksName    = "webhooks"
11	webhooksVersion = 2
12)
13
14var webhooks = Migration{
15	Name:    webhooksName,
16	Version: webhooksVersion,
17	Migrate: func(ctx context.Context, tx *db.Tx) error {
18		return migrateUp(ctx, tx, webhooksVersion, webhooksName)
19	},
20	Rollback: func(ctx context.Context, tx *db.Tx) error {
21		return migrateDown(ctx, tx, webhooksVersion, webhooksName)
22	},
23}