-- Добавила таблицу с платежами
CREATE TABLE TCContractOutgoings
(
	ContractID		int NOT NULL,
	ItemNum			int NOT NULL,
	Date			datetime,
	PaySize			decimal(18,2),
	Details			nvarchar(200)
	PRIMARY KEY (ContractID, ItemNum)
)
GO
--Создаем связи
ALTER TABLE TCContractOutgoings
	ADD FOREIGN KEY (ContractID)
	REFERENCES TCContracts(ContractID)
	ON DELETE CASCADE
        ON UPDATE CASCADE
GO