New Jersey Subscriber Answer: You should code the diabetes mellitus as the primary diagnosis and list the foot ulcer as the secondary diagnosis. In fact, you should 'always' code diabetes first, at least based on ICD-9 guidelines.
ICD-9 clearly directs you to report diabetes for the primary diagnosis. "Code, if applicable, any causal condition first: diabetes mellitus (250.80-250.83)," states ICD-9's parenthetical instruction following the 707.1x series (Ulcer of lower limbs, except decubitus).
The diabetes instructions reinforce this sequencing. If you look up the diabetes codes in ICD-9's Tabular List, you'll find the instruction "Use additional code to identify manifestation, as: any associated ulceration (707.10-707.9)."
Tip: Let the physician determine if the ulceration is unrelated to the diabetes. For a Medicare beneficiary, you should contact the patient's carrier for its diagnostic sequencing requirement.