UPDATE app_settings
SET value_json = '"⬇️ Описание"'::jsonb,
    updated_at = NOW()
WHERE key='tg_poster_text_overflow_caption';

UPDATE app_settings
SET value_json = $schedule$[
  {"id":"hour-00","time":"00:00","count":4,"enabled":true},
  {"id":"hour-01","time":"01:00","count":4,"enabled":true},
  {"id":"hour-02","time":"02:00","count":4,"enabled":true},
  {"id":"hour-03","time":"03:00","count":4,"enabled":true},
  {"id":"hour-04","time":"04:00","count":4,"enabled":true},
  {"id":"hour-05","time":"05:00","count":4,"enabled":true},
  {"id":"hour-06","time":"06:00","count":4,"enabled":true},
  {"id":"hour-07","time":"07:00","count":4,"enabled":true},
  {"id":"hour-08","time":"08:00","count":4,"enabled":true},
  {"id":"hour-09","time":"09:00","count":4,"enabled":true},
  {"id":"hour-10","time":"10:00","count":4,"enabled":true},
  {"id":"hour-11","time":"11:00","count":4,"enabled":true},
  {"id":"hour-12","time":"12:00","count":4,"enabled":true},
  {"id":"hour-13","time":"13:00","count":4,"enabled":true},
  {"id":"hour-14","time":"14:00","count":4,"enabled":true},
  {"id":"hour-15","time":"15:00","count":4,"enabled":true},
  {"id":"hour-16","time":"16:00","count":4,"enabled":true},
  {"id":"hour-17","time":"17:00","count":4,"enabled":true},
  {"id":"hour-18","time":"18:00","count":4,"enabled":true},
  {"id":"hour-19","time":"19:00","count":4,"enabled":true},
  {"id":"hour-20","time":"20:00","count":4,"enabled":true},
  {"id":"hour-21","time":"21:00","count":4,"enabled":true},
  {"id":"hour-22","time":"22:00","count":4,"enabled":true},
  {"id":"hour-23","time":"23:00","count":4,"enabled":true}
]$schedule$::jsonb,
    updated_at = NOW()
WHERE key='tg_poster_schedule_json';

UPDATE raw_posts
SET editorial_status='published',
    updated_at=NOW()
WHERE publication_status='published'
  AND editorial_status='accepted';

UPDATE raw_posts
SET editorial_status='publish_failed',
    updated_at=NOW()
WHERE publication_status='publish_failed'
  AND editorial_status='accepted';
