CREATE TABLE stats_channels (
  event       VARCHAR NOT NULL,
  timestamp   TIMESTAMPTZ NOT NULL,
  channel_id  BIGINT      NOT NULL REFERENCES channels (id),
  count       BIGINT NOT NULL DEFAULT 0,
  PRIMARY KEY(event, timestamp)
);
