Add evidence and lifted columns to blacklist table with appropriate constraints and indexing
This commit is contained in:
parent
e72a03cb10
commit
65675f1466
1 changed files with 11 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
|||
create table blacklist
|
||||
(
|
||||
uuid varchar(36) default uuid() not null comment 'The Unique Universal Identifier of the blacklist record'
|
||||
primary key comment 'The Unique Universal Identifier Primary Unique Index',
|
||||
uuid varchar(36) default uuid() not null comment 'The Unique Universal Identifier Primary Unique Index'
|
||||
primary key,
|
||||
operator varchar(36) not null comment 'The operator that created this blacklist record',
|
||||
entity varchar(36) not null comment 'The target entity that is blacklisted',
|
||||
evidence varchar(36) null comment 'Optional. The evidence for the blacklist',
|
||||
type enum ('SPAM', 'SCAM', 'SERVICE_ABUSE', 'ILLEGAL_CONTENT', 'MALWARE', 'PHISHING', 'CSAM', 'OTHER') not null comment 'The blacklist reason type',
|
||||
lifted tinyint(1) default 0 not null comment 'Default: 0, 1=The blacklist was lifted and is no longer in effect, 0=The blacklist is not lifted, it is in effect until it expires',
|
||||
expires timestamp null comment 'The timestamp for when the blacklist expires, if null the blacklist never expires',
|
||||
created timestamp default current_timestamp() not null comment 'The Timestamp for when the record was created',
|
||||
constraint blacklist_uuid_uindex
|
||||
|
@ -12,6 +14,9 @@ create table blacklist
|
|||
constraint blacklist_entities_uuid_fk
|
||||
foreign key (entity) references entities (uuid)
|
||||
on update cascade on delete cascade,
|
||||
constraint blacklist_evidence_uuid_fk
|
||||
foreign key (evidence) references evidence (uuid)
|
||||
on update cascade on delete cascade,
|
||||
constraint blacklist_operators_uuid_fk
|
||||
foreign key (operator) references operators (uuid)
|
||||
on update cascade on delete cascade
|
||||
|
@ -26,6 +31,10 @@ create index blacklist_entity_index
|
|||
on blacklist (entity)
|
||||
comment 'The Unique Universal Identifier of the entity index';
|
||||
|
||||
create index blacklist_evidence_index
|
||||
on blacklist (evidence)
|
||||
comment 'The index for the blacklist evidence column';
|
||||
|
||||
create index blacklist_operator_index
|
||||
on blacklist (operator)
|
||||
comment 'The Unique Universal Identifier of the operator index';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue