Added a code_type column and support for it to the ar_activity sql table, take 4.