﻿CREATE TABLE [dbo].[ActionsEduColleges] (
    [Id]                     INT            IDENTITY (1, 1) NOT NULL,
    [CommentaireInterne]     NVARCHAR (MAX) NOT NULL,
    [CommentaoirePublic]     NVARCHAR (MAX) NOT NULL,
    [NbEleves]               NVARCHAR (MAX) NOT NULL,
    [Montant]                NVARCHAR (MAX) NOT NULL,
    [TiersAstre_Code]        NVARCHAR (MAX) NOT NULL,
    [TiersAstre_Nom]         NVARCHAR (MAX) NOT NULL,
    [TiersAstre_CodeFamille] NVARCHAR (MAX) NOT NULL,
    [TiersAstre_Description] NVARCHAR (MAX) NOT NULL,
    [College_Id]             INT            NOT NULL,
    [ActionEdu_Id]           INT            NOT NULL,
    CONSTRAINT [PK_ActionsEduColleges] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_ActionEduCollegeActionEdu] FOREIGN KEY ([ActionEdu_Id]) REFERENCES [dbo].[ActionsEdu] ([Id]),
    CONSTRAINT [FK_ActionEduCollegeCollege] FOREIGN KEY ([College_Id]) REFERENCES [dbo].[Colleges] ([Id])
);


GO
CREATE NONCLUSTERED INDEX [IX_FK_ActionEduCollegeCollege]
    ON [dbo].[ActionsEduColleges]([College_Id] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_FK_ActionEduCollegeActionEdu]
    ON [dbo].[ActionsEduColleges]([ActionEdu_Id] ASC);

