Either upon granting of custody of a child to the department and the provision of foster care or upon the department's making foster care maintenance payments on behalf of a child under provisions of Title IV-E of the Social Security Act, the department shall by operation of law be assigned the right to any support owed to or for such child. The assignment:
Ala. Code § 38-10-31 (1975)