        CREATE TRIGGER trigger_delete_old_rows_manpower_group
        AFTER INSERT ON manpower_group
        EXECUTE PROCEDURE delete_old_rows_manpower_group();
    """)
    session.execute("""
        CREATE OR REPLACE FUNCTION delete_old_rows_manpower_individual() RETURNS TRIGGER
        LANGUAGE plpgsql
        AS
        $$
        BEGIN
            DELETE FROM manpower_individual WHERE created_at < NOW() - INTERVAL '1095 days';
        RETURN NULL;
        END;
        $$;