/usr/share/libpreludedb/classic/pgsql-update-14-2.sql is in libpreludedb7-pgsql 4.1.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | UPDATE _format SET version='14.2';
ALTER TABLE Prelude_Alertident ADD COLUMN _index INT4;
ALTER TABLE Prelude_Alertident ALTER COLUMN _index SET NOT NULL;
ALTER TABLE Prelude_Alertident ADD PRIMARY KEY (_parent_type, _message_ident, _index);
DROP INDEX prelude_alert_ident;
DROP INDEX prelude_analyzer_index_model;
CREATE INDEX prelude_analyzer_index_model ON Prelude_Analyzer (_parent_type,_index,model);
/* Update the data type of the column _index from Prelude_Analyzer */
ALTER TABLE Prelude_Analyzer ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Analyzer SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Analyzer DROP COLUMN _index;
ALTER TABLE Prelude_Analyzer RENAME temp_useless_column to _index;
/* Prelude_Analyzer->_index data type updated*/
DROP INDEX prelude_classification_index;
CREATE INDEX prelude_classification_index_text ON Prelude_Classification (text);
ALTER TABLE Prelude_Reference ADD PRIMARY KEY (_message_ident, _index);
DROP INDEX prelude_reference_index_message_ident;
/* Update the data type of the column _index from Prelude_Reference */
ALTER TABLE Prelude_Reference ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Reference SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Reference DROP COLUMN _index;
ALTER TABLE Prelude_Reference RENAME temp_useless_column to _index;
/* Prelude_Reference->_index data type updated*/
/* Update the data type of the column _index from Prelude_Source */
ALTER TABLE Prelude_Source ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Source SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Source DROP COLUMN _index;
ALTER TABLE Prelude_Source RENAME temp_useless_column to _index;
/* Prelude_Source->_index data type updated*/
/* Update the data type of the column _index from Prelude_Target */
ALTER TABLE Prelude_Target ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Target SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Target DROP COLUMN _index;
ALTER TABLE Prelude_Target RENAME temp_useless_column to _index;
/* Prelude_Target->_index data type updated*/
ALTER TABLE Prelude_File ADD COLUMN file_type VARCHAR(255) NULL;
/* Update the data type of the column _parent0_index from Prelude_File */
ALTER TABLE Prelude_File ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_File SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_File DROP COLUMN _parent0_index;
ALTER TABLE Prelude_File RENAME temp_useless_column to _parent0_index;
/* Prelude_File->_parent0_index data type updated*/
/* Update the data type of the column _index from Prelude_File */
ALTER TABLE Prelude_File ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_File SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_File DROP COLUMN _index;
ALTER TABLE Prelude_File RENAME temp_useless_column to _index;
/* Prelude_File->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_FileAccess */
ALTER TABLE Prelude_FileAccess ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_FileAccess DROP COLUMN _parent0_index;
ALTER TABLE Prelude_FileAccess RENAME temp_useless_column to _parent0_index;
/* Prelude_FileAccess->_parent0_index data type updated*/
/* Update the data type of the column _parent1_index from Prelude_FileAccess */
ALTER TABLE Prelude_FileAccess ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess SET temp_useless_column = CAST(_parent1_index AS INT4);
ALTER TABLE Prelude_FileAccess DROP COLUMN _parent1_index;
ALTER TABLE Prelude_FileAccess RENAME temp_useless_column to _parent1_index;
/* Prelude_FileAccess->_parent1_index data type updated*/
/* Update the data type of the column _index from Prelude_FileAccess */
ALTER TABLE Prelude_FileAccess ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_FileAccess DROP COLUMN _index;
ALTER TABLE Prelude_FileAccess RENAME temp_useless_column to _index;
/* Prelude_FileAccess->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_FileAccess_Permission */
ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _parent0_index;
ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _parent0_index;
/* Prelude_FileAccess_Permission->_parent0_index data type updated*/
/* Update the data type of the column _parent1_index from Prelude_FileAccess_Permission */
ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_parent1_index AS INT4);
ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _parent1_index;
ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _parent1_index;
/* Prelude_FileAccess_Permission->_parent1_index data type updated*/
/* Update the data type of the column _parent2_index from Prelude_FileAccess_Permission */
ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_parent2_index AS INT4);
ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _parent2_index;
ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _parent2_index;
/* Prelude_FileAccess_Permission->_parent2_index data type updated*/
/* Update the data type of the column _index from Prelude_FileAccess_Permission */
ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _index;
ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _index;
/* Prelude_FileAccess_Permission->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_Linkage */
ALTER TABLE Prelude_Linkage ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Linkage SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_Linkage DROP COLUMN _parent0_index;
ALTER TABLE Prelude_Linkage RENAME temp_useless_column to _parent0_index;
/* Prelude_Linkage->_parent0_index data type updated*/
/* Update the data type of the column _parent1_index from Prelude_Linkage */
ALTER TABLE Prelude_Linkage ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Linkage SET temp_useless_column = CAST(_parent1_index AS INT4);
ALTER TABLE Prelude_Linkage DROP COLUMN _parent1_index;
ALTER TABLE Prelude_Linkage RENAME temp_useless_column to _parent1_index;
/* Prelude_Linkage->_parent1_index data type updated*/
/* Update the data type of the column _index from Prelude_Linkage */
ALTER TABLE Prelude_Linkage ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Linkage SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Linkage DROP COLUMN _index;
ALTER TABLE Prelude_Linkage RENAME temp_useless_column to _index;
/* Prelude_Linkage->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_Inode */
ALTER TABLE Prelude_Inode ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Inode SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_Inode DROP COLUMN _parent0_index;
ALTER TABLE Prelude_Inode RENAME temp_useless_column to _parent0_index;
/* Prelude_Inode->_parent0_index data type updated*/
/* Update the data type of the column _parent1_index from Prelude_Inode */
ALTER TABLE Prelude_Inode ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Inode SET temp_useless_column = CAST(_parent1_index AS INT4);
ALTER TABLE Prelude_Inode DROP COLUMN _parent1_index;
ALTER TABLE Prelude_Inode RENAME temp_useless_column to _parent1_index;
/* Prelude_Inode->_parent1_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_Checksum */
ALTER TABLE Prelude_Checksum ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Checksum SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_Checksum DROP COLUMN _parent0_index;
ALTER TABLE Prelude_Checksum RENAME temp_useless_column to _parent0_index;
/* Prelude_Checksum->_parent0_index data type updated*/
/* Update the data type of the column _parent1_index from Prelude_Checksum */
ALTER TABLE Prelude_Checksum ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Checksum SET temp_useless_column = CAST(_parent1_index AS INT4);
ALTER TABLE Prelude_Checksum DROP COLUMN _parent1_index;
ALTER TABLE Prelude_Checksum RENAME temp_useless_column to _parent1_index;
/* Prelude_Checksum->_parent1_index data type updated*/
/* Update the data type of the column _index from Prelude_Checksum */
ALTER TABLE Prelude_Checksum ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Checksum SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Checksum DROP COLUMN _index;
ALTER TABLE Prelude_Checksum RENAME temp_useless_column to _index;
/* Prelude_Checksum->_index data type updated*/
/* Update the data type of the column _index from Prelude_Action */
ALTER TABLE Prelude_Action ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Action SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Action DROP COLUMN _index;
ALTER TABLE Prelude_Action RENAME temp_useless_column to _index;
/* Prelude_Action->_index data type updated*/
/* Update the data type of the column _index from Prelude_AdditionalData */
ALTER TABLE Prelude_AdditionalData ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_AdditionalData SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_AdditionalData DROP COLUMN _index;
ALTER TABLE Prelude_AdditionalData RENAME temp_useless_column to _index;
/* Prelude_AdditionalData->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_Node */
ALTER TABLE Prelude_Node ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Node SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_Node DROP COLUMN _parent0_index;
ALTER TABLE Prelude_Node RENAME temp_useless_column to _parent0_index;
/* Prelude_Node->_parent0_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_Address */
ALTER TABLE Prelude_Address ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Address SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_Address DROP COLUMN _parent0_index;
ALTER TABLE Prelude_Address RENAME temp_useless_column to _parent0_index;
/* Prelude_Address->_parent0_index data type updated*/
/* Update the data type of the column _index from Prelude_Address */
ALTER TABLE Prelude_Address ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Address SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_Address DROP COLUMN _index;
ALTER TABLE Prelude_Address RENAME temp_useless_column to _index;
/* Prelude_Address->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_User */
ALTER TABLE Prelude_User ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_User SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_User DROP COLUMN _parent0_index;
ALTER TABLE Prelude_User RENAME temp_useless_column to _parent0_index;
/* Prelude_User->_parent0_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_UserId */
ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_UserId SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_UserId DROP COLUMN _parent0_index;
ALTER TABLE Prelude_UserId RENAME temp_useless_column to _parent0_index;
/* Prelude_UserId->_parent0_index data type updated*/
/* Update the data type of the column _parent1_index from Prelude_UserId */
ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_UserId SET temp_useless_column = CAST(_parent1_index AS INT4);
ALTER TABLE Prelude_UserId DROP COLUMN _parent1_index;
ALTER TABLE Prelude_UserId RENAME temp_useless_column to _parent1_index;
/* Prelude_UserId->_parent1_index data type updated*/
/* Update the data type of the column _parent2_index from Prelude_UserId */
ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_UserId SET temp_useless_column = CAST(_parent2_index AS INT4);
ALTER TABLE Prelude_UserId DROP COLUMN _parent2_index;
ALTER TABLE Prelude_UserId RENAME temp_useless_column to _parent2_index;
/* Prelude_UserId->_parent2_index data type updated*/
/* Update the data type of the column _index from Prelude_UserId */
ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_UserId SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_UserId DROP COLUMN _index;
ALTER TABLE Prelude_UserId RENAME temp_useless_column to _index;
/* Prelude_UserId->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_Process */
ALTER TABLE Prelude_Process ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_Process SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_Process DROP COLUMN _parent0_index;
ALTER TABLE Prelude_Process RENAME temp_useless_column to _parent0_index;
/* Prelude_Process->_parent0_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_ProcessArg */
ALTER TABLE Prelude_ProcessArg ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_ProcessArg SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_ProcessArg DROP COLUMN _parent0_index;
ALTER TABLE Prelude_ProcessArg RENAME temp_useless_column to _parent0_index;
/* Prelude_ProcessArg->_parent0_index data type updated*/
/* Update the data type of the column _index from Prelude_ProcessArg */
ALTER TABLE Prelude_ProcessArg ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_ProcessArg SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_ProcessArg DROP COLUMN _index;
ALTER TABLE Prelude_ProcessArg RENAME temp_useless_column to _index;
/* Prelude_ProcessArg->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_ProcessEnv */
ALTER TABLE Prelude_ProcessEnv ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_ProcessEnv SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_ProcessEnv DROP COLUMN _parent0_index;
ALTER TABLE Prelude_ProcessEnv RENAME temp_useless_column to _parent0_index;
/* Prelude_ProcessEnv->_parent0_index data type updated*/
/* Update the data type of the column _index from Prelude_ProcessEnv */
ALTER TABLE Prelude_ProcessEnv ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_ProcessEnv SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_ProcessEnv DROP COLUMN _index;
ALTER TABLE Prelude_ProcessEnv RENAME temp_useless_column to _index;
/* Prelude_ProcessEnv->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_WebService */
ALTER TABLE Prelude_WebService ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_WebService SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_WebService DROP COLUMN _parent0_index;
ALTER TABLE Prelude_WebService RENAME temp_useless_column to _parent0_index;
/* Prelude_WebService->_parent0_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_WebServiceArg */
ALTER TABLE Prelude_WebServiceArg ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_WebServiceArg SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_WebServiceArg DROP COLUMN _parent0_index;
ALTER TABLE Prelude_WebServiceArg RENAME temp_useless_column to _parent0_index;
/* Prelude_WebServiceArg->_parent0_index data type updated*/
/* Update the data type of the column _index from Prelude_WebServiceArg */
ALTER TABLE Prelude_WebServiceArg ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_WebServiceArg SET temp_useless_column = CAST(_index AS INT4);
ALTER TABLE Prelude_WebServiceArg DROP COLUMN _index;
ALTER TABLE Prelude_WebServiceArg RENAME temp_useless_column to _index;
/* Prelude_WebServiceArg->_index data type updated*/
/* Update the data type of the column _parent0_index from Prelude_SNMPService */
ALTER TABLE Prelude_SNMPService ADD COLUMN temp_useless_column INT4;
UPDATE Prelude_SNMPService SET temp_useless_column = CAST(_parent0_index AS INT4);
ALTER TABLE Prelude_SNMPService DROP COLUMN _parent0_index;
ALTER TABLE Prelude_SNMPService RENAME temp_useless_column to _parent0_index;
/* Prelude_SNMPService->_parent0_index data type updated*/
ALTER TABLE Prelude_Linkage ADD PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index);
ALTER TABLE Prelude_Impact ADD CHECK (severity IN ('info', 'low', 'medium', 'high'));
DROP INDEX prelude_node_index_name;
DROP INDEX prelude_node_index_location;
CREATE INDEX prelude_node_index_location ON Prelude_Node (_parent_type,_parent0_index,location);
CREATE INDEX prelude_node_index_name ON Prelude_Node (_parent_type,_parent0_index,name);
DROP INDEX prelude_address_index_address;
CREATE INDEX prelude_address_index_address ON Prelude_Address (_parent_type,_parent0_index,_index,address);
DROP INDEX prelude_service_index_protocol_port;
DROP INDEX prelude_service_index_protocol_name;
CREATE INDEX prelude_service_index_protocol_port ON Prelude_Service (_parent_type,_parent0_index,protocol, port);
CREATE INDEX prelude_service_index_protocol_name ON Prelude_Service (_parent_type,_parent0_index,protocol, name);
|