CREATE TABLE [dbo].[claim_variables_recoveries]
(
[clvr_claim_id] [int] NOT NULL,
[clvr_variable_id] [int] NOT NULL,
[clvr_date] [datetime] NOT NULL,
[clvr_amount] [dbo].[ais_decimal2] NOT NULL,
[clvr_user_code] [dbo].[ais_code_medium] NOT NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[claim_variables_recoveries] ADD
CONSTRAINT [FK_claim_variables_recoveries_usr_users] FOREIGN KEY ([clvr_user_code]) REFERENCES [dbo].[usr_users] ([usr_user_code])
GO
ALTER TABLE [dbo].[claim_variables_recoveries] ADD CONSTRAINT [PK_claim_variables_recoveries] PRIMARY KEY CLUSTERED  ([clvr_claim_id], [clvr_variable_id], [clvr_date]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[claim_variables_recoveries] ADD CONSTRAINT [FK_claim_variables_recoveries_claim_variables] FOREIGN KEY ([clvr_claim_id], [clvr_variable_id]) REFERENCES [dbo].[claim_variables] ([clv_claim_id], [clv_variable_id])
GO
