CREATE TABLE [dbo].[acc_cts_bordereaux_accounts]
(
[ctsa_bordereau_id] [int] NOT NULL,
[ctsa_policy_id] [int] NOT NULL,
[ctsa_account_id] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_cts_bordereaux_accounts] ADD CONSTRAINT [PK_acc_cts_bordereaux_accounts] PRIMARY KEY CLUSTERED  ([ctsa_bordereau_id], [ctsa_policy_id], [ctsa_account_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_cts_bordereaux_accounts] ADD CONSTRAINT [FK_acc_cts_bordereaux_accounts_acc_accounts] FOREIGN KEY ([ctsa_account_id]) REFERENCES [dbo].[acc_accounts] ([a_account_id])
GO
ALTER TABLE [dbo].[acc_cts_bordereaux_accounts] ADD CONSTRAINT [FK_acc_cts_bordereaux_accounts_acc_cts_bordereaux_policies] FOREIGN KEY ([ctsa_bordereau_id], [ctsa_policy_id]) REFERENCES [dbo].[acc_cts_bordereaux_policies] ([ctsp_bordereau_id], [ctsp_policy_id])
GO
