ALTER TABLE SETTING_NAME ADD CONSTRAINT FK_SETTING_NAME_SETTING FOREIGN KEY (ID_SETTING) REFERENCES SETTING (ID_SETTING) ON UPDATE CASCADE ON DELETE CASCADE;

ALTER TABLE CONTRAGENT ADD CONSTRAINT UNQ_CONTRAGENT_NAME UNIQUE (CONTRAGENT_NAME);

ALTER TABLE NOM_DISCOUNT ADD CONSTRAINT UNQ_DISCOUNT_NAME UNIQUE (DISCOUNT_NAME);

ALTER TABLE INVENT ADD CONSTRAINT UNQ_INVENT_NAME UNIQUE (INVENT_NAME);

ALTER TABLE MENU_PRICE_LIST ADD CONSTRAINT UNQ_MENU_PRICE_LIST UNIQUE (PRICE_LIST_NAME, ID_MENU_HEAD);

ALTER TABLE NOM_PAYMENT_TYPE ADD CONSTRAINT UNQ_PAYMENT_TYPE_NAME UNIQUE (PAYMENT_NAME);

ALTER TABLE NOM_VAT_GROUP ADD CONSTRAINT UNQ_VAT_GROUP_NAME UNIQUE (VAT_NAME);

ALTER TABLE STOCK_GROUP ADD CONSTRAINT UNQ_STOCK_GROUP_NAME UNIQUE (STOCK_GROUP);

commit work;

