--- autoreplies-offline


ALTER TABLE autoreplies
  RENAME COLUMN user_id TO offline_user_id;

ALTER TABLE autoreplies
  RENAME COLUMN days TO offline_days;

ALTER TABLE autoreplies
  RENAME COLUMN start_hour TO offline_start_hour;

ALTER TABLE autoreplies
  RENAME COLUMN end_hour TO offline_end_hour;

ALTER TABLE autoreplies
  RENAME COLUMN no_operators_min TO offline_timeout_min;


UPDATE autoreplies
SET type = 'offline'
WHERE type = 'no_operators';
