-- Reverses 043_de_instance_split_proceedings.

DELETE FROM paliad.deadline_rules
 WHERE proceeding_type_id IN (
        SELECT id FROM paliad.proceeding_types
         WHERE code IN ('DE_INF_OLG','DE_INF_BGH','DE_NULL_BGH')
       );

DELETE FROM paliad.proceeding_types
 WHERE code IN ('DE_INF_OLG','DE_INF_BGH','DE_NULL_BGH');

DELETE FROM paliad.deadline_concepts
 WHERE slug IN ('nichtzulassungsbeschwerde','nichtzulassungsbeschwerde-begruendung',
                'revisionsfrist','revisionsbegruendung')
   AND id NOT IN (SELECT concept_id FROM paliad.deadline_rules WHERE concept_id IS NOT NULL);
