geo ip_info 테이블 생성 조건 변경

This commit is contained in:
Lectom C Han
2025-12-10 13:16:39 +09:00
parent 869f912886
commit 0c300321d7
3 changed files with 53 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/jackc/pgx/v5"
"geoip-rest/internal/importer"
"geoip-rest/internal/userprogram"
)
const (
@@ -49,6 +50,10 @@ func main() {
log.Fatalf("failed to import updates from %s: %v", updateDir, err)
}
if err := userprogram.SeedIPGeoInfoIfMissing(ctx, conn, schema); err != nil {
log.Fatalf("failed to seed ip_geoinfo: %v", err)
}
log.Printf("%s is ready in schema %s using data from %s (updates: %s)", targetTableName, schema, csvPath, updateDir)
}