Skip to content

Commit b226f73

Browse files
committed
stub
1 parent 6c6bedd commit b226f73

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

database/stub/stub.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,22 @@ func (s *Stub) Run(migration io.Reader) error {
9898
if err != nil {
9999
return err
100100
}
101+
102+
if err := s.Trigger(database.TrigRunPre, struct {
103+
Query string
104+
}{Query: string(m[:])}); err != nil {
105+
return &database.Error{OrigErr: err, Err: "failed to trigger RunPre"}
106+
}
107+
101108
s.LastRunMigration = m
102109
s.MigrationSequence = append(s.MigrationSequence, string(m[:]))
110+
111+
if err := s.Trigger(database.TrigRunPost, struct {
112+
Query string
113+
}{Query: string(m[:])}); err != nil {
114+
return &database.Error{OrigErr: err, Err: "failed to trigger RunPost"}
115+
}
116+
103117
return nil
104118
}
105119

0 commit comments

Comments
 (0)