db add attachment fixed