feat: remove unused column type logging and streamline migration job processing

This commit is contained in:
2026-04-06 10:48:56 -05:00
parent 828fc57121
commit c49ff65b1d
2 changed files with 30 additions and 17 deletions

27
cmd/go_migrate/process.go Normal file
View File

@@ -0,0 +1,27 @@
package main
import (
"database/sql"
"github.com/jackc/pgx/v5/pgxpool"
_ "github.com/microsoft/go-mssqldb"
log "github.com/sirupsen/logrus"
)
func processMigrationJob(sourceDb *sql.DB, targetDb *pgxpool.Pool, job MigrationJob) {
sourceColTypes, targetColTypes, err := GetColumnTypes(sourceDb, targetDb, job)
if err != nil {
log.Fatal("Unexpected error: ", err)
}
logColumnTypes(sourceColTypes, "Source col types")
logColumnTypes(targetColTypes, "Target col types")
}
func logColumnTypes(columnTypes []ColumnType, label string) {
log.Info(label)
for _, col := range columnTypes {
log.Infof("%+v", col)
}
}