Add entities table for storing known entities and their attributes

This commit is contained in:
netkas 2025-05-30 12:02:47 -04:00
parent daf2035363
commit 51b501e329
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -0,0 +1,22 @@
create table entities
(
uuid varchar(36) default uuid() not null comment 'The Unique Universal Identifier of the entity'
primary key comment 'The primary unique index of the entity',
id varchar(255) not null comment 'The Unique Identifier of the entity',
domain varchar(255) null comment 'The domain',
created timestamp default current_timestamp() not null comment 'The Timestamp for when this entity was created',
constraint entities_id_domain_uindex
unique (id, domain) comment 'The Unique Index of the Entity ID and Domain combination',
constraint entities_uuid_uindex
unique (uuid) comment 'The primary unique index of the entity'
)
comment 'A table for housing known entities in the database';
create index entities_domain_index
on entities (domain)
comment 'The domain name of the entity';
create index entities_id_index
on entities (id)
comment 'The index of the entity ID';