@@ -456,10 +456,10 @@ type MigrationInstruction struct {
456
456
TempColumnIdentifier string
457
457
}
458
458
459
- type ColumnMigrationStep func (dialect Dialect , table Table , instructions ... MigrationInstruction ) ([]string , error )
459
+ type ColumnMigrationStep func (dialect Dialect , table Table , instructions [] MigrationInstruction ) ([]string , error )
460
460
461
461
var StdMigrationSteps = []ColumnMigrationStep {
462
- func (dialect Dialect , table Table , instructions ... MigrationInstruction ) ([]string , error ) {
462
+ func (dialect Dialect , table Table , instructions [] MigrationInstruction ) ([]string , error ) {
463
463
var queries []string
464
464
for _ , ins := range instructions {
465
465
queries = append (
@@ -474,7 +474,7 @@ var StdMigrationSteps = []ColumnMigrationStep{
474
474
475
475
return queries , nil
476
476
},
477
- func (dialect Dialect , table Table , instructions ... MigrationInstruction ) ([]string , error ) {
477
+ func (dialect Dialect , table Table , instructions [] MigrationInstruction ) ([]string , error ) {
478
478
var query strings.Builder
479
479
query .WriteString (fmt .Sprintf ("UPDATE %s SET " , table .Identifier ))
480
480
@@ -490,7 +490,7 @@ var StdMigrationSteps = []ColumnMigrationStep{
490
490
491
491
return []string {query .String ()}, nil
492
492
},
493
- func (dialect Dialect , table Table , instructions ... MigrationInstruction ) ([]string , error ) {
493
+ func (dialect Dialect , table Table , instructions [] MigrationInstruction ) ([]string , error ) {
494
494
var queries []string
495
495
for _ , ins := range instructions {
496
496
queries = append (
@@ -504,7 +504,7 @@ var StdMigrationSteps = []ColumnMigrationStep{
504
504
505
505
return queries , nil
506
506
},
507
- func (dialect Dialect , table Table , instructions ... MigrationInstruction ) ([]string , error ) {
507
+ func (dialect Dialect , table Table , instructions [] MigrationInstruction ) ([]string , error ) {
508
508
var queries []string
509
509
for _ , ins := range instructions {
510
510
queries = append (queries ,
@@ -518,7 +518,7 @@ var StdMigrationSteps = []ColumnMigrationStep{
518
518
519
519
return queries , nil
520
520
},
521
- func (dialect Dialect , table Table , instructions ... MigrationInstruction ) ([]string , error ) {
521
+ func (dialect Dialect , table Table , instructions [] MigrationInstruction ) ([]string , error ) {
522
522
var queries []string
523
523
524
524
for _ , ins := range instructions {
@@ -579,7 +579,7 @@ func StdColumnTypeMigrations(ctx context.Context, dialect Dialect, table Table,
579
579
var renderedSteps []string
580
580
for step , instructions := range stepInstructions {
581
581
for i , s := range steps [step :] {
582
- newStep , err := s (dialect , table , instructions ... )
582
+ newStep , err := s (dialect , table , instructions )
583
583
if err != nil {
584
584
return nil , fmt .Errorf ("rendering step %d: %w" , i , err )
585
585
}
0 commit comments