Skip to content

Commit

Permalink
Fix unique constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Mar 17, 2024
1 parent 52938e6 commit feb8680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/metrics/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func (m *Metrics) initTables() error {
" `organization` VARCHAR(255) NOT NULL," +
" `count` int unsigned NOT NULL," +
" `network` VARCHAR(255) NOT NULL," +
"UNIQUE KEY `asn-network-unique` (`asn-network`)" +
"UNIQUE KEY `asn-network-unique` (`asn`, `network`)" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;"

result, err := m.mysqlClient.Query(query)
Expand Down

0 comments on commit feb8680

Please sign in to comment.