CREATE TABLE sms_data (
  smsid INT NOT NULL AUTO_INCREMENT,
  id varchar(200) NULL,
  message TEXT NULL,
  sent_status varchar(20) NULL,
  request_id varchar(50) NULL,
  owner varchar(50) NULL,
  user_id varchar(50) NULL,
  contact varchar(20) NULL,
  content TEXT NULL,
  encrypted BOOLEAN NULL,
  type varchar(20) NULL,
  data_status varchar(50) NULL,
  sim varchar(20) NULL,
  send_time TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  request_received_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  order_timestamp TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  last_attempted_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  scheduled_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  sent_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  scheduled_send_time TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  delivered_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  expired_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  failed_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  can_be_polled BOOLEAN NULL,
  send_attempt_count INT NULL,
  max_send_attempts INT NULL,
  received_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  failure_reason varchar(50) NULL,
  PRIMARY KEY (smsid)
);