CREATE TABLE [dbo].[acc_cts_bordereaux_policies]
(
[ctsp_bordereau_id] [int] NOT NULL,
[ctsp_policy_id] [int] NOT NULL,
[ctsp_amount_inv] [dbo].[ais_decimal2] NULL,
[ctsp_amount_adv] [dbo].[ais_decimal2] NULL,
[ctsp_amount] [dbo].[ais_decimal2] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_cts_bordereaux_policies] ADD CONSTRAINT [PK_acc_cts_bordereaux_policies] PRIMARY KEY CLUSTERED  ([ctsp_bordereau_id], [ctsp_policy_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_cts_bordereaux_policies] ADD CONSTRAINT [FK_acc_cts_bordereaux_policies_acc_cts_bordereaux] FOREIGN KEY ([ctsp_bordereau_id]) REFERENCES [dbo].[acc_cts_bordereaux] ([ctsb_bordereau_id])
GO
ALTER TABLE [dbo].[acc_cts_bordereaux_policies] ADD CONSTRAINT [FK_acc_cts_bordereaux_policies_pol_policies] FOREIGN KEY ([ctsp_policy_id]) REFERENCES [dbo].[pol_policies] ([pol_policy_id])
GO
