
BEGIN;

UPDATE model.entity SET description = '[N.b. Epistula 22 is wrongly labelled as addressed to Valerius not Aurelius]' WHERE id = 2835;
UPDATE model.link SET domain_id = 2835 WHERE property_code = 'P67' AND domain_id IN (
2838, 2840, 2842, 2844, 2847, 2849, 2851, 2853, 2855, 2857, 2859, 2861, 2863, 2865, 2867, 2869, 2871, 2873, 2875, 2877, 2879, 2881, 2883, 2885, 2887, 2889, 2891, 2893, 2895, 2897, 2899, 2901, 2903, 2905, 2907, 2909, 2911, 2913, 2915, 2917, 2920, 2922, 2924, 2926, 2928, 2930, 2932, 2934, 2936, 2943, 2945, 2947, 2949, 2951, 2953, 2955, 2957, 2959, 2961, 2963, 2991, 2993, 2995, 2997, 2999, 3001, 3003, 3005, 3007, 3009, 3011, 3013, 3015, 3017, 3019, 3135, 3137, 3139, 3142, 3144, 3382, 3384, 3391, 3396, 3404, 3408, 3416, 3425, 3434, 3439, 3524, 3526, 3528, 3530, 3532, 3534, 3536, 3538, 3540, 3542, 3544, 3693, 3695, 3697, 3699, 3971, 3974, 4304, 4306, 4308, 4310, 4312, 4314, 4316, 4318, 4320, 4322, 4549, 4559, 4572, 7253
);
DELETE FROM model.entity WHERE id IN (
2838, 2840, 2842, 2844, 2847, 2849, 2851, 2853, 2855, 2857, 2859, 2861, 2863, 2865, 2867, 2869, 2871, 2873, 2875, 2877, 2879, 2881, 2883, 2885, 2887, 2889, 2891, 2893, 2895, 2897, 2899, 2901, 2903, 2905, 2907, 2909, 2911, 2913, 2915, 2917, 2920, 2922, 2924, 2926, 2928, 2930, 2932, 2934, 2936, 2943, 2945, 2947, 2949, 2951, 2953, 2955, 2957, 2959, 2961, 2963, 2991, 2993, 2995, 2997, 2999, 3001, 3003, 3005, 3007, 3009, 3011, 3013, 3015, 3017, 3019, 3135, 3137, 3139, 3142, 3144, 3382, 3384, 3391, 3396, 3404, 3408, 3416, 3425, 3434, 3439, 3524, 3526, 3528, 3530, 3532, 3534, 3536, 3538, 3540, 3542, 3544, 3693, 3695, 3697, 3699, 3971, 3974, 4304, 4306, 4308, 4310, 4312, 4314, 4316, 4318, 4320, 4322, 4549, 4559, 4572, 7253
);

UPDATE model.link SET domain_id = 2941 WHERE property_code = 'P67' AND domain_id IN (
2965, 2973, 2982, 2984, 3022, 3028, 3034, 3087, 3091, 3098, 3101, 3107, 3115, 3120, 3122, 3127, 3130, 3146, 3150, 3158, 3162, 3166, 3172, 3180, 3185, 3192, 3196, 3200, 3208, 3209, 3241, 3278, 4579, 4594, 5358, 5359, 5362, 5364, 5366, 5368, 5370, 5559, 5561, 5563, 5565, 5567, 5569, 5571, 5577
);
DELETE FROM model.entity WHERE id IN (
2965, 2973, 2982, 2984, 3022, 3028, 3034, 3087, 3091, 3098, 3101, 3107, 3115, 3120, 3122, 3127, 3130, 3146, 3150, 3158, 3162, 3166, 3172, 3180, 3185, 3192, 3196, 3200, 3208, 3209, 3241, 3278, 4579, 4594, 5358, 5359, 5362, 5364, 5366, 5368, 5370, 5559, 5561, 5563, 5565, 5567, 5569, 5571, 5577
);

UPDATE model.link SET domain_id = 3204 WHERE property_code = 'P67' AND domain_id IN (
5351, 5355, 5373, 5380, 5382, 5390, 5394, 5398, 5424, 5908, 7478
);
DELETE FROM model.entity WHERE id IN (
5351, 5355, 5373, 5380, 5382, 5390, 5394, 5398, 5424, 5908, 7478
);

UPDATE model.link SET domain_id = 2834 WHERE property_code = 'P67' AND domain_id IN (
2836, 2837, 2839, 2841, 2843, 2846, 2848, 2850, 2852, 2854, 2856, 2858, 2860, 2862, 2864, 2866, 2868, 2870, 2872, 2874, 2876, 2878, 2880, 2882, 2884, 2886, 2888, 2890, 2892, 2894, 2896, 3381, 3383, 3389, 3395, 3403, 3407, 3415, 3422, 3433, 3438, 3523, 3525, 3527, 3529, 3531, 3533, 3535, 7252
);
DELETE FROM model.entity WHERE id IN (
2836, 2837, 2839, 2841, 2843, 2846, 2848, 2850, 2852, 2854, 2856, 2858, 2860, 2862, 2864, 2866, 2868, 2870, 2872, 2874, 2876, 2878, 2880, 2882, 2884, 2886, 2888, 2890, 2892, 2894, 2896, 3381, 3383, 3389, 3395, 3403, 3407, 3415, 3422, 3433, 3438, 3523, 3525, 3527, 3529, 3531, 3533, 3535, 7252
);

UPDATE model.link SET domain_id = 2898 WHERE property_code = 'P67' AND domain_id IN (
2900, 2902, 2904, 2906, 2908, 2910, 2912, 2914, 2916, 2918, 2919, 2921, 2923, 2925, 2927, 2929, 2931, 2933, 2935, 2940, 2942, 2944, 2946, 2948, 2950, 2952, 2954, 2956, 2958, 2960, 2962, 2966, 2972, 2981, 2983, 2990, 2992, 2994, 2996, 2998, 3000, 3002, 3004, 3006, 3008, 3010, 3012, 3014, 3016, 3018, 3021, 3027, 3033, 3086, 3092, 3099, 3102, 3106, 3114, 3119, 3121, 3126, 3131, 3134, 3136, 3138, 3140, 3141, 3143, 3147, 3151, 3537, 3539, 3541, 3543, 3692, 3694, 3696, 3698, 3972, 3973, 4303, 4305, 4307, 4309, 4311, 4313, 4315, 4317, 4319, 4321, 4547, 4556, 4569, 4577, 4590, 5357, 5360, 5361, 5363, 5365, 5367, 5369, 5558, 5560, 5562, 5564, 5566, 5568, 5570, 5576
);
DELETE FROM model.entity WHERE id IN (
2900, 2902, 2904, 2906, 2908, 2910, 2912, 2914, 2916, 2918, 2919, 2921, 2923, 2925, 2927, 2929, 2931, 2933, 2935, 2940, 2942, 2944, 2946, 2948, 2950, 2952, 2954, 2956, 2958, 2960, 2962, 2966, 2972, 2981, 2983, 2990, 2992, 2994, 2996, 2998, 3000, 3002, 3004, 3006, 3008, 3010, 3012, 3014, 3016, 3018, 3021, 3027, 3033, 3086, 3092, 3099, 3102, 3106, 3114, 3119, 3121, 3126, 3131, 3134, 3136, 3138, 3140, 3141, 3143, 3147, 3151, 3537, 3539, 3541, 3543, 3692, 3694, 3696, 3698, 3972, 3973, 4303, 4305, 4307, 4309, 4311, 4313, 4315, 4317, 4319, 4321, 4547, 4556, 4569, 4577, 4590, 5357, 5360, 5361, 5363, 5365, 5367, 5369, 5558, 5560, 5562, 5564, 5566, 5568, 5570, 5576
);

UPDATE model.link SET domain_id = 3159 WHERE property_code = 'P67' AND domain_id IN (
3163, 3167, 3173, 3181, 3186, 3191, 3195, 3201, 3205, 3210, 3217, 3219, 3223, 3231, 3235, 3239, 3242, 3279, 3280, 3286, 3288, 3706, 3714, 3716, 3720, 3746, 3818, 3846, 3848, 3852, 4273, 4277, 4282, 4287, 4294, 4298, 4302, 4368, 4373, 4376, 4495, 4732, 4736, 4743, 4927, 5131, 5133, 5138, 5142, 5150, 5151, 5155, 5159, 5233, 5237, 5241, 5246, 5270, 5274, 5278, 5282, 5287, 5291, 5296, 5300, 5304, 5308, 5312, 5316, 5320, 5342, 5345, 5352, 5356, 5374, 5381, 5383, 5391, 5395, 5399, 5425, 5580, 5585, 5588, 5614, 5617, 5627, 5909, 6167, 6175, 6180, 6560, 7060, 7178, 7447, 7451, 7468, 7471, 7479, 7515, 7521, 7583, 7588, 7594, 7597, 7600, 7605, 7610, 7611, 7619, 7622
);
DELETE FROM model.entity WHERE id IN (
3163, 3167, 3173, 3181, 3186, 3191, 3195, 3201, 3205, 3210, 3217, 3219, 3223, 3231, 3235, 3239, 3242, 3279, 3280, 3286, 3288, 3706, 3714, 3716, 3720, 3746, 3818, 3846, 3848, 3852, 4273, 4277, 4282, 4287, 4294, 4298, 4302, 4368, 4373, 4376, 4495, 4732, 4736, 4743, 4927, 5131, 5133, 5138, 5142, 5150, 5151, 5155, 5159, 5233, 5237, 5241, 5246, 5270, 5274, 5278, 5282, 5287, 5291, 5296, 5300, 5304, 5308, 5312, 5316, 5320, 5342, 5345, 5352, 5356, 5374, 5381, 5383, 5391, 5395, 5399, 5425, 5580, 5585, 5588, 5614, 5617, 5627, 5909, 6167, 6175, 6180, 6560, 7060, 7178, 7447, 7451, 7468, 7471, 7479, 7515, 7521, 7583, 7588, 7594, 7597, 7600, 7605, 7610, 7611, 7619, 7622
);

COMMIT;
