]>
Git — Sourcephile - tmp/julm/LesQuatreRoux.git/blob - sql/init/Vente.sql
2 CREATE CACHED
TABLE "Vente"
3 ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL
4 , produit
INTEGER NOT NULL
5 , quantité
DECIMAL(100,3) DEFAULT 1.000 NOT NULL
6 , panier
INTEGER NOT NULL
7 , CONSTRAINT "PK_Vente" PRIMARY KEY(ID)
8 , CONSTRAINT "FK_Vente_produit"
10 REFERENCES "Produit"(ID)
12 , CONSTRAINT "FK_Vente_panier"
14 REFERENCES "Panier"(ID)
16 , CONSTRAINT "La combinaison (produit, panier) d'une vente doit être unique"
17 UNIQUE (produit
, panier
)