All checks were successful
continuous-integration/drone/push Build is passing
GetZoneStatsData and GetZoneStatsV2's netspeed_active values can exceed 2 billion, causing 32-bit integer overflow. Changed from int32/uint32 to int (64-bit on modern systems) to handle large network speed totals. - Update sqlc column overrides to use int type - Fix type compatibility in dnsanswers.go zoneTotals map - Regenerate database code with new types Fixes https://community.ntppool.org/t/error-message-displayed-on-the-monitoring-score-page/4063
26 lines
701 B
YAML
26 lines
701 B
YAML
version: "2"
|
|
sql:
|
|
- schema: "schema.sql"
|
|
queries: "query.sql"
|
|
engine: "mysql"
|
|
gen:
|
|
go:
|
|
package: "ntpdb"
|
|
out: "ntpdb"
|
|
emit_json_tags: true
|
|
emit_db_tags: true
|
|
omit_unused_structs: true
|
|
emit_interface: true
|
|
# emit_all_enum_values: true
|
|
rename:
|
|
servers.Ip: IP
|
|
overrides:
|
|
- column: log_scores.attributes
|
|
go_type: go.ntppool.org/common/types.LogScoreAttributes
|
|
- column: "server_netspeed.netspeed_active"
|
|
go_type: "int"
|
|
- column: "zone_server_counts.netspeed_active"
|
|
go_type: "int"
|
|
- db_type: "bigint"
|
|
go_type: "int"
|