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


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


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

