 create index idx_ent_prop on entity_property(cls, name, "value");
    
 create table signal_store (
-  seq_num identity,
+  seq_num bigint generated by default as identity,
   cls varchar(512) not null, 
   id varchar(255) not null,
   event_cls varchar(512) not null,
   event_bytes blob not null,
-  primary key(seq_num)
+  primary key (seq_num)
 ); 
    
  create index idx_sig_store on signal_store(cls, id, seq_num);

create table signal_queue (
  seq_num identity,
  cls varchar(512) not null,
  id  varchar(255) not null,
  event_cls varchar(512) not null,
  event_bytes blob not null,
  primary key(seq_num)
);
  
create table delayed_signal_queue (
  seq_num identity,
  from_cls varchar(512) not null, 
  from_id varchar(255) not null,
  cls varchar(512) not null,

  "value" varchar(255) not null,
  range_name varchar(255) not null, 
  range_value bigint not null,
  primary key (cls, id, name, "value"),
  foreign key (cls, id) references entity (cls, id)
);

