@@ -75,22 +75,22 @@ func testMigrateUpAndDown(t *testing.T, db *bun.DB) {
7575 migrations := migrate .NewMigrations ()
7676 migrations .Add (migrate.Migration {
7777 Name : "20060102150405" ,
78- Up : func (ctx context.Context , db * bun.DB ) error {
78+ Up : func (ctx context.Context , db * bun.DB , templateData any ) error {
7979 history = append (history , "up1" )
8080 return nil
8181 },
82- Down : func (ctx context.Context , db * bun.DB ) error {
82+ Down : func (ctx context.Context , db * bun.DB , templateData any ) error {
8383 history = append (history , "down1" )
8484 return nil
8585 },
8686 })
8787 migrations .Add (migrate.Migration {
8888 Name : "20060102160405" ,
89- Up : func (ctx context.Context , db * bun.DB ) error {
89+ Up : func (ctx context.Context , db * bun.DB , templateData any ) error {
9090 history = append (history , "up2" )
9191 return nil
9292 },
93- Down : func (ctx context.Context , db * bun.DB ) error {
93+ Down : func (ctx context.Context , db * bun.DB , templateData any ) error {
9494 history = append (history , "down2" )
9595 return nil
9696 },
@@ -125,33 +125,33 @@ func testMigrateUpError(t *testing.T, db *bun.DB) {
125125 migrations := migrate .NewMigrations ()
126126 migrations .Add (migrate.Migration {
127127 Name : "20060102150405" ,
128- Up : func (ctx context.Context , db * bun.DB ) error {
128+ Up : func (ctx context.Context , db * bun.DB , templateData any ) error {
129129 history = append (history , "up1" )
130130 return nil
131131 },
132- Down : func (ctx context.Context , db * bun.DB ) error {
132+ Down : func (ctx context.Context , db * bun.DB , templateData any ) error {
133133 history = append (history , "down1" )
134134 return nil
135135 },
136136 })
137137 migrations .Add (migrate.Migration {
138138 Name : "20060102160405" ,
139- Up : func (ctx context.Context , db * bun.DB ) error {
139+ Up : func (ctx context.Context , db * bun.DB , templateData any ) error {
140140 history = append (history , "up2" )
141141 return errors .New ("failed" )
142142 },
143- Down : func (ctx context.Context , db * bun.DB ) error {
143+ Down : func (ctx context.Context , db * bun.DB , templateData any ) error {
144144 history = append (history , "down2" )
145145 return nil
146146 },
147147 })
148148 migrations .Add (migrate.Migration {
149149 Name : "20060102170405" ,
150- Up : func (ctx context.Context , db * bun.DB ) error {
150+ Up : func (ctx context.Context , db * bun.DB , templateData any ) error {
151151 history = append (history , "up3" )
152152 return errors .New ("failed" )
153153 },
154- Down : func (ctx context.Context , db * bun.DB ) error {
154+ Down : func (ctx context.Context , db * bun.DB , templateData any ) error {
155155 history = append (history , "down3" )
156156 return nil
157157 },
0 commit comments