insert into status_resolutions
(id,
 parent_status_type,
 deletable,
 weigth)
values (nextval('status_resolutions_id_seq'),
        (select id from status_types where status_types.name = 'active'),
        false,
        2);

insert into status_resolution_titles (id, resolution_id, lang, title)
values (nextval('status_resolutions_titles_id_seq'),
        (select id
         from status_resolutions
         where status_resolutions.parent_status_type = (select id from status_types where status_types.name = 'active')
         and weigth = 2
         limit 1),
        'RU',
        'Работа с обращениями'),
       (nextval('status_resolutions_titles_id_seq'),
        (select id
         from status_resolutions
         where status_resolutions.parent_status_type = (select id from status_types where status_types.name = 'active')
         and weigth = 2
         limit 1),
        'EN',
        'Working with tickets');
