Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL baseline cleanup #1614

Merged
merged 31 commits into from
Nov 15, 2017
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4102acf
whitespace cleanup
lunkwill42 Nov 14, 2017
1b7694a
insert new top-level categories in the correct place
lunkwill42 Nov 14, 2017
863cc2c
properly effectuate rename from subcat -> netboxgroup
lunkwill42 Nov 14, 2017
be1748a
removal of deviceid unique constraint on module table
lunkwill42 Nov 14, 2017
8c20a6a
properly change schema of swportblocked
lunkwill42 Nov 14, 2017
2d6f886
insert all subsystems in the same location of the script
lunkwill42 Nov 14, 2017
10c4cf0
insert all event- and alert types in the same location of script
lunkwill42 Nov 14, 2017
972143a
don't alter tables after the fact, make it right the first time!
lunkwill42 Nov 14, 2017
735789f
there is no data to fix when installing the baseline!
lunkwill42 Nov 14, 2017
999df73
insert 'unknown' vendor in the correct place.
lunkwill42 Nov 14, 2017
0b9b12b
"IF NOT EXISTS" is unnecessary in the baseline
lunkwill42 Nov 14, 2017
4e144d1
move inserts of even more event- and alerttypes
lunkwill42 Nov 14, 2017
9d10439
no need to drop a constraint from baseline, just never create it!
lunkwill42 Nov 14, 2017
8516b5e
whitespace cleanup
lunkwill42 Nov 14, 2017
c69b966
there is no data to fix when installing the baseline!
lunkwill42 Nov 14, 2017
3b606d4
navprofiles: don't alter tables after the fact, make it right the fir…
lunkwill42 Nov 14, 2017
3bb11d0
add account.preferences from the start, this is the baseline!
lunkwill42 Nov 14, 2017
a9e1c13
set list limit from the start, this is the baseline!
lunkwill42 Nov 14, 2017
2aa179b
consolidate AccountGroupPrivilege changes since last baseline
lunkwill42 Nov 14, 2017
9e080df
move insertion of alertsender to correct place
lunkwill42 Nov 14, 2017
f260fb1
consolidate updated matchfields since last baseline
lunkwill42 Nov 14, 2017
e717514
move insertions to correct location
lunkwill42 Nov 14, 2017
5b25c73
navprofiles: don't alter tables after the fact, make it right the fir…
lunkwill42 Nov 14, 2017
80f6302
add (possibly) clarifying comment
lunkwill42 Nov 14, 2017
4ee7ae6
there is no need to clean up data that isn't there!
lunkwill42 Nov 14, 2017
ab428b2
consolidate dashboard/widget changes since last baseline
lunkwill42 Nov 14, 2017
60c9afe
insert macwatch subsystem in the expected location
lunkwill42 Nov 15, 2017
392a1da
group things logically and add descriptive comments for each section
lunkwill42 Nov 15, 2017
7f36d99
no need for explicit transactions in changescripts
lunkwill42 Nov 15, 2017
bdebdd4
clean up relations that have been placed in the wrong db schema on so…
lunkwill42 Nov 15, 2017
de60751
remove obsolete but sometimes lingering objects from PostgreSQL database
lunkwill42 Nov 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
insert all subsystems in the same location of the script
lunkwill42 committed Nov 14, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2d6f886e78df2ff45ab401e3a31ac0a88414e503
8 changes: 3 additions & 5 deletions sql/baseline/manage.sql
Original file line number Diff line number Diff line change
@@ -580,6 +580,9 @@ INSERT INTO subsystem (name) VALUES ('getDeviceData');
INSERT INTO subsystem (name) VALUES ('devBrowse');
INSERT INTO subsystem (name) VALUES ('maintenance');
INSERT INTO subsystem (name) VALUES ('snmptrapd');
INSERT INTO subsystem (name) VALUES ('powersupplywatch');
INSERT INTO subsystem (name) VALUES ('ipdevpoll');



------------------------------------------------------------------------------------------
@@ -978,9 +981,6 @@ INSERT INTO alerttype (eventtypeid, alerttype, alerttypedesc) VALUES
INSERT INTO alerttype (eventtypeid, alerttype, alerttypedesc) VALUES
('snmpAgentState', 'snmpAgentUp', 'SNMP agent is up.');

INSERT INTO subsystem (name) VALUES ('ipdevpoll');


-- Ensure any associated service alerts are closed when a service is deleted
CREATE RULE close_alerthist_services
AS ON DELETE TO service DO
@@ -1074,8 +1074,6 @@ WHERE eventtypeid='snmpAgentState'
AND alerthist.netboxid = netbox.netboxid
AND COALESCE(netbox.ro, '') = '';

INSERT INTO subsystem VALUES ('powersupplywatch');

-- create new event and alert types for fan and psu alerts

INSERT INTO eventtype (eventtypeid, eventtypedesc, stateful) VALUES