CREATE TABLE [dbo].[acc_bordereaux_companies]
(
[bdrcie_bordereau_id] [int] NOT NULL,
[bdrcie_type_code] [dbo].[ais_code_short] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_bordereaux_companies] ADD CONSTRAINT [PK_acc_bordereaux_compagnies] PRIMARY KEY CLUSTERED  ([bdrcie_bordereau_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_bordereaux_companies] ADD CONSTRAINT [FK_acc_bordereaux_companies_acc_bordereaux] FOREIGN KEY ([bdrcie_bordereau_id]) REFERENCES [dbo].[acc_bordereaux] ([bdr_bordereau_id])
GO
ALTER TABLE [dbo].[acc_bordereaux_companies] ADD CONSTRAINT [FK_acc_bordereaux_companies_nm_bordereaux_companies_types] FOREIGN KEY ([bdrcie_type_code]) REFERENCES [dbo].[nm_bordereaux_companies_types] ([bdrciet_type_code])
GO
