Skip to content

Commit

Permalink
Going to have to redo v3.2 again
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Nov 28, 2020
1 parent 9707e43 commit 11fb429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ function plugin_flowview_check_upgrade() {
$good = db_fetch_row("SHOW INDEXES
FROM `" . $t['TABLE_NAME'] . "`
WHERE Key_name='keycol'
AND Column_name='end_time';");
AND Column_name='src_if';");

if (!cacti_sizeof($good)) {
cacti_log('NOTE: Updating unique key for ' . $t['TABLE_NAME'], false, 'FLOWVIEW');

db_execute('ALTER TABLE ' . $t['TABLE_NAME'] . '
DROP INDEX `keycol`,
ADD UNIQUE INDEX `keycol` (`listener_id`,`src_addr`,`src_port`,`dst_addr`,`dst_port`, `start_time`, `end_time`)');
ADD UNIQUE INDEX `keycol` (`listener_id`, `src_addr`, `src_port`, `src_if`,`dst_addr`,`dst_port`, `dst_if`, `start_time`, `end_time`)');
}
}
}
Expand Down

0 comments on commit 11fb429

Please sign in to comment.