mirror of https://github.com/MISP/MISP
fix: Some additional changes to accomodate for the automatically enabled sightings
parent
d30a48ab71
commit
2875789804
|
@ -496,6 +496,24 @@ CREATE TABLE `sharing_groups` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table sightings
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sightings (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
attribute_id int(11) NOT NULL,
|
||||
event_id int(11) NOT NULL,
|
||||
org_id int(11) NOT NULL,
|
||||
date_sighting bigint(20) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
INDEX attribute_id (attribute_id),
|
||||
INDEX event_id (event_id),
|
||||
INDEX org_id (org_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tags`
|
||||
--
|
||||
|
|
|
@ -496,6 +496,25 @@ CREATE INDEX idx_sharing_groups_organisation_uuid ON sharing_groups (organisatio
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table sightings
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sightings (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
attribute_id int(11) NOT NULL,
|
||||
event_id int(11) NOT NULL,
|
||||
org_id int(11) NOT NULL,
|
||||
date_sighting bigint(20) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_sightings_attribute_id ON sightings (attribute_id);
|
||||
CREATE INDEX idx_sightings_event_id ON sightings (event_id);
|
||||
CREATE INDEX idx_sightings_org_id ON sightings (org_id);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table tags
|
||||
--
|
||||
|
|
|
@ -125,16 +125,16 @@ class AppModel extends Model {
|
|||
$sql = 'ALTER TABLE `event_blacklists` ADD `event_orgc` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL , ADD `event_info` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, ADD `comment` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;';
|
||||
break;
|
||||
case 'addSightings':
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `sightings` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`attribute_id` int(11) NOT NULL,
|
||||
`event_id` int(11) NOT NULL,
|
||||
`org_id` int(11) NOT NULL,
|
||||
`date_sighting` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `attribute_id` (`attribute_id`),
|
||||
INDEX `event_id` (`event_id`),
|
||||
INDEX `org_id` (`org_id`)
|
||||
$sql = "CREATE TABLE IF NOT EXISTS sightings (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
attribute_id int(11) NOT NULL,
|
||||
event_id int(11) NOT NULL,
|
||||
org_id int(11) NOT NULL,
|
||||
date_sighting bigint(20) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
INDEX attribute_id (attribute_id),
|
||||
INDEX event_id (event_id),
|
||||
INDEX org_id (org_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;";
|
||||
break;
|
||||
case 'makeAttributeUUIDsUnique':
|
||||
|
|
|
@ -1015,11 +1015,10 @@ class Server extends AppModel {
|
|||
'Sightings_enable' => array(
|
||||
'level' => 1,
|
||||
'description' => 'Enables or disables the sighting functionality. When enabled, users can use the UI or the appropriate APIs to submit sightings data about indicators.',
|
||||
'value' => false,
|
||||
'value' => true,
|
||||
'errorMessage' => '',
|
||||
'test' => 'testBool',
|
||||
'type' => 'boolean',
|
||||
'beforeHook' => 'sightingsBeforeHook',
|
||||
),
|
||||
'Sightings_policy' => array(
|
||||
'level' => 1,
|
||||
|
|
Loading…
Reference in New Issue