A very minor issue but shouldn't this be 'type_id' or 'data_type_id'  like 