aboutsummaryrefslogtreecommitdiff
path: root/options.go
blob: 7856336ad13e749bb58bad28ccd95d913983c0ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package migrate

//import "context"

// An Option configures a migrator
type Option func(*Migrator) error

// SetVersionTable configures the table used for recording the schema version
func SetVersionTable(vt string) Option {
	return func(m *Migrator) error {
		m.versionTable = &vt
		return nil
	}
}

// SetCallback configures the table used for recording the schema version
func SetCallback(cb ResultFunc) Option {
	return func(m *Migrator) error {
		m.callback = cb
		return nil
	}
}

// SetContext configures the context for queries
/*
func SetContext(ctx context.Context) Option {
	return func(m *Migrator) error {
		m.ctx = ctx
		return nil
	}
}
*/