chg: [schema] Mark more indexes as unique

pull/7659/head
Jakub Onderka 2021-08-13 13:53:59 +02:00
parent ec87f8bfa3
commit 1cd09dd919
4 changed files with 7 additions and 7 deletions

View File

@ -440,7 +440,7 @@ CREATE TABLE IF NOT EXISTS `galaxies` (
`kill_chain_order` text,
PRIMARY KEY (id),
INDEX `name` (`name`),
INDEX `uuid` (`uuid`),
UNIQUE INDEX `uuid` (`uuid`),
INDEX `type` (`type`),
INDEX `namespace` (`namespace`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -1409,7 +1409,7 @@ CREATE TABLE IF NOT EXISTS `users` (
`date_created` bigint(20),
`date_modified` bigint(20),
PRIMARY KEY (`id`),
INDEX `email` (`email`),
UNIQUE INDEX `email` (`email`),
INDEX `org_id` (`org_id`),
INDEX `server_id` (`server_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

View File

@ -1534,7 +1534,7 @@ class AppModel extends Model
`value` text NOT NULL,
`from_json` tinyint(1) default 0,
PRIMARY KEY (`id`),
INDEX `value` (`value`(255))
UNIQUE INDEX `value` (`value`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
break;
case 66:

View File

@ -68,7 +68,7 @@ class User extends AppModel
'email' => array(
'emailValidation' => array(
'rule' => array('validateEmail'),
'message' => 'Please nter a valid email address.',
'message' => 'Please enter a valid email address.',
'required' => true,
),
'unique' => array(

View File

@ -7823,7 +7823,7 @@
},
"correlation_exclusions": {
"id": true,
"value": false
"value": true
},
"dashboards": {
"id": true,
@ -7907,7 +7907,7 @@
"galaxies": {
"id": true,
"name": false,
"uuid": false,
"uuid": true,
"type": false,
"namespace": false
},
@ -8183,7 +8183,7 @@
},
"users": {
"id": true,
"email": false,
"email": true,
"org_id": false,
"server_id": false
},