--- recreate-channels-statistics

DROP TABLE stats_channels;

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

