-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration script from db version 8 to 9 (policy dimension)
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
DROP VIEW view_hijacks; | ||
|
||
ALTER TABLE hijacks | ||
ALTER COLUMN type TYPE VARCHAR ( 7 ) USING replace( | ||
replace( | ||
replace( | ||
replace( | ||
replace( | ||
replace(type::VARCHAR ( 5 ), 'S|0|-', 'S|0|-|-'), | ||
'S|1|-', 'S|1|-|-'), | ||
'S|-|-', 'S|-|-|-'), | ||
'E|0|-', 'E|0|-|-'), | ||
'E|1|-', 'E|1|-|-'), | ||
'Q|0|-', 'Q|0|-|-')::VARCHAR ( 7 ); | ||
|
||
CREATE OR REPLACE VIEW view_hijacks AS SELECT key, type, prefix, hijack_as, num_peers_seen, num_asns_inf, time_started, time_ended, time_last, mitigation_started, time_detected, timestamp_of_config, under_mitigation, resolved, active, ignored, configured_prefix, comment, seen, withdrawn, outdated, peers_withdrawn, peers_seen FROM hijacks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters