Database design

https://dbdiagram.io

Table instances as T {
  id varchar [pk]
}
Table configurations as C {
  id varchar [pk]
  instance_id varchar [not null, unique, ref: - T.id]
    remote_url varchar [not null]
  authentication_type varchar [not null]
  username varchar
  password varchar
  token varchar
  selected_reference varchar
}

Table events as E {
  id varchar [pk]
  instance_id varchar [not null, ref: > T.id]
  result_type varchar [not null]
  event_type varchar [not null]
  details blob
  date bigint [not null]
}

Tables