
409 So.2d 432 (1982)
Juanita Hale KNIGHT
v.
Robert KNIGHT, Jr.
Civ. 2882.
Court of Civil Appeals of Alabama.
January 6, 1982.
*433 Agnes Chappell and Houston L. Brown of Brown, Chappell & Burrell, Birmingham, for appellant.
No brief for appellee.
WRIGHT, Presiding Judge.
The parties herein were divorced on December 6, 1979. An agreement was executed setting out various terms including that the husband would pay the wife $400 for payment of her attorney of record. The final decree of divorce set out the same amount to be paid by the husband for the wife's attorney fees. The decree, however, did not refer to the agreement. The husband failed to pay the amount ordered for the attorney fee. The wife petitioned for a writ of garnishment to collect the fee. The City of Birmingham, the husband's employer, was garnishee.
Pursuant to § 6-6-482, Code (1975) which exempts the salary of public officials and employees from garnishment to enforce judgments "ex delicto," the City filed a motion to quash the writ. The wife filed objections to the motion asserting that the judgment was founded on a debt, demand or claim and thus outside the prohibition of § 6-6-482. She also contended that her garnishment was for enforcement of a judgment entered in an action on a "contract or growing out of a contract" within the ambit of that section. Alternatively, the wife contended that § 6-6-482 is violative of the equal protection clause of the Constitution of the United States and of Alabama, and that to deny the garnishment would be against public policy. Additionally, she argues that there is only one form of action under Rule 2, A.R.C.P. known as a "civil action."
*434 The trial court ordered the writ quashed on May 22, 1981. From that order, the wife appeals.
Section 6-6-481, Code (1975) specifically allows garnishment of "money due officials or employees of a city, county or state government, or any department or institution thereof, as salary for services performed ..." Section 6-6-482 limits such garnishment in the following manner:
The salary referred to in this division is not subject to a writ of garnishment in aid of a pending action, but such writ may issue only after final judgment, on which execution can issue, entered in actions on contracts or growing out of contracts express or implied and being judgments ex contractu. The judgment on which such writ can issue must be founded upon a debt, demand or claim against said defendant which originated subsequent to September 26, 1923. The salary referred to in this division is not subject to writ of garnishment issued on judgments ex delicto.
The wife reiterates on appeal the grounds upon which her objections to the motion to quash were made. No brief has been filed by the City of Birmingham.
Appellant's first contention is essentially that the underlying judgment of divorce falls within the class of judgments ex contractu rather than ex delicto. In support of that theory, she offers the following:
1. That marriage is a civil contract which gives rise to an obligation of support;
2. That the agreement reached between the parties prior to the final decree of divorce was the basis of the final judgment entered; and
3. That a judgment itself is a contract.
We do not agree that a divorce decree is a judgment ex contractu under any of the above theories. Black's Law Dictionary at "divorce suit" sets out that,
A "divorce" suit is a civil proceeding founded on a matrimonial wrong, wherein the married parties are plaintiff and defendant, and the government, or public, occupies, without being mentioned in the pleadings, the position of a third party, resulting in a triangle and otherwise sui generis action of tort. (Cite omitted.) (Emphasis ours.)
Although marriage is a civil contract which gives rise to the obligation of support, Andrews v. City National Bank of Birmingham, 349 So.2d 1 (Ala.1977), that does not give a divorce decree the status of an ex contractu judgment. The difference in ex contractu and ex delicto has been expressed as follows:
If the cause of action declared in the pleading arises from a breach of promise, it is ex contractu, and if the action arises from a breach of duty growing out of the contract, it is in form ex delicto and case.
Chambers v. Birmingham Trust and Savings Co., 232 Ala. 609, 168 So. 893 (1936). A divorce judgment, at least as far as support, maintenance and attorney fees are concerned, seems to derive not from a direct breach of promise, but from the breach of the duty to support growing out of the marriage contract. Thus, it is ex delicto. Marriage, though of extreme societal importance, has been held to be a contract whose obligation is not constitutionally protected by the prohibition against the impairment of the obligation of contracts. See, Fuqua v. Fuqua, 268 Ala. 127, 104 So.2d 925 (1958); Raia v. Raia, 214 Ala. 391, 108 So. 11 (1926).
The agreement of the parties is of no consequence here. Though the amount awarded in the decree was the same as agreed, the trial court was not bound by the agreement and within its discretion could adopt or reject such parts of it as the court deemed proper. Baumler v. Baumler, 368 So.2d 864 (Ala.Civ.App.1979). Even where an agreement is incorporated in the court's decree, the decree itself supersedes it. See, Durham v. Durham, 336 So.2d 1360 (Ala. Civ.App.1976); Horan v. Horan, 259 Ala. 117, 65 So.2d 486 (1953).
Appellant's contention that a judgment is a contract is not well taken within the context of this case. Admittedly the case of Weaver v. Lapsley, 43 Ala. 224 (1869) is *435 authority for that principle, and in Alabama judgments are contracts within the constitutional prohibition of impairment of the obligation thereof. As set out in 46 Am. Jur.2d Judgments § 233, a judgment is not a contract in the strict sense of the word. A judgment's status as a contract thus does not change its nature.
Our supreme court held in Lasseter v. Lasseter, 266 Ala. 459, 97 So.2d 555 (1957) that "A decree for alimony and attorney's fees is not a `debt contracted' within the meaning of our Constitution and statutes. (Cites omitted); and `as related to exemptions, the demand is in tort and not ex contractu.'" The court also stated there that "The decree for support and maintenance `is in tort and not ex contractu.'" The end result of Lasseter, which is directly on point here, was that the public employee's salary was exempt from garnishment since the underlying judgment was ex delicto. This court is bound by prior decisions of our supreme court. Martin v. Springdale Stores, Inc., 354 So.2d 1144, cert. denied, 354 So.2d 1146 (Ala.Civ.App.1978).
Appellant's second contention is that the distinction between ex contractu and ex delicto judgments found in § 6-6-482 denies equal protection of the law under the Constitution of the United States and of Alabama to holders of judgments ex delicto.
Prior to the passage of § 6-6-481, the governmental bodies of Alabama were apparently immune from being made garnishee through the doctrine of governmental or sovereign immunity. This is the general rule, and as set out in 6 Am.Jur.2d Attachment and Garnishment § 84, is only changed by statute. Thus, the passage of § 6-6-481 et seq., relinquished a portion of that immunity. Alabama courts have consistently held that the modification of the doctrine is a legislative question, not one for the courts. Jenkins v. Houston County Hospital Board, 284 Ala. 180, 223 So.2d 583 (1969); Paul v. Escambia County Hospital Board, 283 Ala. 488, 218 So.2d 817 (1969); Stephens v. Druid City Hospital Board, 49 Ala.App. 40, 268 So.2d 824 (1972). We must uphold the legislature unless its mandate is contrary to the Constitution. Enterprise City Board of Education v. Miller, 348 So.2d 782 (Ala.1977).
The test for a classification made by the legislature is whether the class has a reasonable basis and is not arbitrary. Board of Trustees Retirement System of Montgomery v. Talley, 291 Ala. 307, 280 So.2d 553 (1973). The criteria for determining reasonableness and arbitrariness is as follows:
The class "(1) must be germane to the purpose of the law; (2) must bring within its influence all who are under the same conditions and apply equally to each person or member of the class, or each person or member who may become one of such class; (3) must not be so restricted and made to rest upon existing circumstances only as not to include proper additions to the number included within the class; (4) must be based on substantial distinctions which make one class different from another; and (5) must be reasonable and not oppressive and prohibitive.
Talley, supra, 280 So.2d at 556, 557. In First National Bank of Montgomery v. Dimmick, 190 Ala. 359, 67 So. 309 (1914), our supreme court upheld several garnishment statutes against equal protection arguments despite the fact that "The Legislature... made distinct classifications of creditors and conferred upon each class separate and distinct methods of procedure for the enforcement of their debts against garnishee." The court noted there that "Garnishment, like attachment, is a statutory remedy, and the statutes which we have above quoted plainly show their meaning and the rights which they conferred upon those who invoke their aid." 67 So. at 309, 310. The Court added that "[W]e are not concerned with the wisdom of the Legislature in passing this law. The act was within legislative competency and was valid. (Cite omitted.)" 67 So. at 310.
We consider that the statute in question was also within legislative competency. The modification of sovereign immunity lies with the legislature, and allowing *436 garnishment only upon judgments ex contractu where a governmental unit is garnishee is not unreasonable. On the contrary, protecting creditors' rights under judgments on contracts freely entered into preserves the constitutional prohibition against impairment of contracts, and is thus a legitimate end.
We disagree with appellant's contention that Rule 2, A.R.C.P. destroyed the distinction between judgments ex contractu and ex delicto.
Lasseter, supra, was correct in its statement that "The plain and unambiguous language of § 1035 (now 6-6-482) ... exempts the salary of the public official from garnishment issued on judgments ex delicto." 97 So.2d at 557. We also agree with that decision in that the result reached here is not the one we would have selected, "[B]ut the remedy must lie with the Legislature, not with the courts." 97 So.2d at 557.
The judgment below is due to be affirmed.
AFFIRMED.
BRADLEY and HOLMES, JJ., concur.
