Skip to content

Commit

Permalink
Bring in Assessment Registration domain DS 5.2 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
semalaiappan committed Nov 4, 2024
1 parent cf6a9d3 commit 0ab7d46
Show file tree
Hide file tree
Showing 28 changed files with 9,196 additions and 689 deletions.
6,746 changes: 6,073 additions & 673 deletions Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/Metadata/ApiModel.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ BEGIN TRANSACTION
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.AssessmentAdministration') AND name = N'UX_AssessmentAdministration_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_AssessmentAdministration_Id ON [edfi].[AssessmentAdministration]
(Id) WITH (PAD_INDEX = ON, FILLFACTOR = 75, STATISTICS_NORECOMPUTE = OFF) ON [PRIMARY]
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.AssessmentBatteryPart') AND name = N'UX_AssessmentBatteryPart_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_AssessmentBatteryPart_Id ON [edfi].[AssessmentBatteryPart]
(Id) WITH (PAD_INDEX = ON, FILLFACTOR = 75, STATISTICS_NORECOMPUTE = OFF) ON [PRIMARY]
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.AssessmentItem') AND name = N'UX_AssessmentItem_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_AssessmentItem_Id ON [edfi].[AssessmentItem]
Expand All @@ -38,6 +52,13 @@ BEGIN TRANSACTION
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.AssesssmentAdministrationParticipation') AND name = N'UX_AssesssmentAdministrationParticipation_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_AssesssmentAdministrationParticipation_Id ON [edfi].[AssesssmentAdministrationParticipation]
(Id) WITH (PAD_INDEX = ON, FILLFACTOR = 75, STATISTICS_NORECOMPUTE = OFF) ON [PRIMARY]
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.BalanceSheetDimension') AND name = N'UX_BalanceSheetDimension_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_BalanceSheetDimension_Id ON [edfi].[BalanceSheetDimension]
Expand Down Expand Up @@ -591,6 +612,20 @@ BEGIN TRANSACTION
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.StudentAssessmentRegistration') AND name = N'UX_StudentAssessmentRegistration_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_StudentAssessmentRegistration_Id ON [edfi].[StudentAssessmentRegistration]
(Id) WITH (PAD_INDEX = ON, FILLFACTOR = 75, STATISTICS_NORECOMPUTE = OFF) ON [PRIMARY]
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.StudentAssessmentRegistrationBatteryPartAssociation') AND name = N'UX_StudentAssessmentRegistrationBatteryPartAssociation_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_StudentAssessmentRegistrationBatteryPartAssociation_Id ON [edfi].[StudentAssessmentRegistrationBatteryPartAssociation]
(Id) WITH (PAD_INDEX = ON, FILLFACTOR = 75, STATISTICS_NORECOMPUTE = OFF) ON [PRIMARY]
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.StudentCohortAssociation') AND name = N'UX_StudentCohortAssociation_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_StudentCohortAssociation_Id ON [edfi].[StudentCohortAssociation]
Expand Down Expand Up @@ -626,6 +661,13 @@ BEGIN TRANSACTION
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.StudentEducationOrganizationAssessmentAccommodation') AND name = N'UX_StudentEducationOrganizationAssessmentAccommodation_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_StudentEducationOrganizationAssessmentAccommodation_Id ON [edfi].[StudentEducationOrganizationAssessmentAccommodation]
(Id) WITH (PAD_INDEX = ON, FILLFACTOR = 75, STATISTICS_NORECOMPUTE = OFF) ON [PRIMARY]
GO
COMMIT

BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'edfi.StudentEducationOrganizationAssociation') AND name = N'UX_StudentEducationOrganizationAssociation_Id')
CREATE UNIQUE NONCLUSTERED INDEX UX_StudentEducationOrganizationAssociation_Id ON [edfi].[StudentEducationOrganizationAssociation]
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ BEGIN
CREATE INDEX IX_Assessment_EducationOrganizationId ON [edfi].[Assessment](EducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_AssesssmentAdministrationParticipation_AssigningEducationOrganizationId' AND object_id = OBJECT_ID('edfi.AssesssmentAdministrationParticipation'))
BEGIN
CREATE INDEX IX_AssesssmentAdministrationParticipation_AssigningEducationOrganizationId ON [edfi].[AssesssmentAdministrationParticipation](AssigningEducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_BellSchedule_SchoolId' AND object_id = OBJECT_ID('edfi.BellSchedule'))
BEGIN
CREATE INDEX IX_BellSchedule_SchoolId ON [edfi].[BellSchedule](SchoolId) INCLUDE (Id)
Expand Down Expand Up @@ -284,6 +289,31 @@ BEGIN
CREATE INDEX IX_StudentAssessmentEducationOrganizationAssociation_EducationOrganizationId ON [edfi].[StudentAssessmentEducationOrganizationAssociation](EducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentAssessmentRegistration_AssigningEducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentAssessmentRegistration'))
BEGIN
CREATE INDEX IX_StudentAssessmentRegistration_AssigningEducationOrganizationId ON [edfi].[StudentAssessmentRegistration](AssigningEducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentAssessmentRegistration_EducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentAssessmentRegistration'))
BEGIN
CREATE INDEX IX_StudentAssessmentRegistration_EducationOrganizationId ON [edfi].[StudentAssessmentRegistration](EducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentAssessmentRegistration_SchoolId' AND object_id = OBJECT_ID('edfi.StudentAssessmentRegistration'))
BEGIN
CREATE INDEX IX_StudentAssessmentRegistration_SchoolId ON [edfi].[StudentAssessmentRegistration](SchoolId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentAssessmentRegistrationBatteryPartAssociation_AssigningEducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentAssessmentRegistrationBatteryPartAssociation'))
BEGIN
CREATE INDEX IX_StudentAssessmentRegistrationBatteryPartAssociation_AssigningEducationOrganizationId ON [edfi].[StudentAssessmentRegistrationBatteryPartAssociation](AssigningEducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentAssessmentRegistrationBatteryPartAssociation_EducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentAssessmentRegistrationBatteryPartAssociation'))
BEGIN
CREATE INDEX IX_StudentAssessmentRegistrationBatteryPartAssociation_EducationOrganizationId ON [edfi].[StudentAssessmentRegistrationBatteryPartAssociation](EducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentCohortAssociation_EducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentCohortAssociation'))
BEGIN
CREATE INDEX IX_StudentCohortAssociation_EducationOrganizationId ON [edfi].[StudentCohortAssociation](EducationOrganizationId) INCLUDE (Id)
Expand All @@ -299,6 +329,11 @@ BEGIN
CREATE INDEX IX_StudentDisciplineIncidentNonOffenderAssociation_SchoolId ON [edfi].[StudentDisciplineIncidentNonOffenderAssociation](SchoolId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentEducationOrganizationAssessmentAccommodation_EducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentEducationOrganizationAssessmentAccommodation'))
BEGIN
CREATE INDEX IX_StudentEducationOrganizationAssessmentAccommodation_EducationOrganizationId ON [edfi].[StudentEducationOrganizationAssessmentAccommodation](EducationOrganizationId) INCLUDE (Id)
END;

IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name='IX_StudentEducationOrganizationAssociation_EducationOrganizationId' AND object_id = OBJECT_ID('edfi.StudentEducationOrganizationAssociation'))
BEGIN
CREATE INDEX IX_StudentEducationOrganizationAssociation_EducationOrganizationId ON [edfi].[StudentEducationOrganizationAssociation](EducationOrganizationId) INCLUDE (Id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ CREATE SEQUENCE [edfi].[Assessment_AggSeq] START WITH -2147483648 INCREMENT BY 1
ALTER TABLE [edfi].[Assessment] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Assessment_AggSeq];
CREATE INDEX [IX_Assessment_AggregateId] ON [edfi].[Assessment] (AggregateId);

CREATE SEQUENCE [edfi].[AssessmentAdministration_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[AssessmentAdministration] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AssessmentAdministration_AggSeq];
CREATE INDEX [IX_AssessmentAdministration_AggregateId] ON [edfi].[AssessmentAdministration] (AggregateId);

CREATE SEQUENCE [edfi].[AssessmentBatteryPart_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[AssessmentBatteryPart] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AssessmentBatteryPart_AggSeq];
CREATE INDEX [IX_AssessmentBatteryPart_AggregateId] ON [edfi].[AssessmentBatteryPart] (AggregateId);

CREATE SEQUENCE [edfi].[AssessmentItem_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[AssessmentItem] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AssessmentItem_AggSeq];
CREATE INDEX [IX_AssessmentItem_AggregateId] ON [edfi].[AssessmentItem] (AggregateId);
Expand All @@ -23,6 +31,10 @@ CREATE SEQUENCE [edfi].[AssessmentScoreRangeLearningStandard_AggSeq] START WITH
ALTER TABLE [edfi].[AssessmentScoreRangeLearningStandard] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AssessmentScoreRangeLearningStandard_AggSeq];
CREATE INDEX [IX_AssessmentScoreRangeLearningStandard_AggregateId] ON [edfi].[AssessmentScoreRangeLearningStandard] (AggregateId);

CREATE SEQUENCE [edfi].[AssesssmentAdministrationParticipation_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[AssesssmentAdministrationParticipation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AssesssmentAdministrationParticipation_AggSeq];
CREATE INDEX [IX_AssesssmentAdministrationParticipation_AggregateId] ON [edfi].[AssesssmentAdministrationParticipation] (AggregateId);

CREATE SEQUENCE [edfi].[BalanceSheetDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[BalanceSheetDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[BalanceSheetDimension_AggSeq];
CREATE INDEX [IX_BalanceSheetDimension_AggregateId] ON [edfi].[BalanceSheetDimension] (AggregateId);
Expand Down Expand Up @@ -339,6 +351,14 @@ CREATE SEQUENCE [edfi].[StudentAssessmentEducationOrganizationAssociation_AggSeq
ALTER TABLE [edfi].[StudentAssessmentEducationOrganizationAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAssessmentEducationOrganizationAssociation_AggSeq];
CREATE INDEX [IX_StudentAssessmentEducationOrganizationAssociation_AggregateId] ON [edfi].[StudentAssessmentEducationOrganizationAssociation] (AggregateId);

CREATE SEQUENCE [edfi].[StudentAssessmentRegistration_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[StudentAssessmentRegistration] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAssessmentRegistration_AggSeq];
CREATE INDEX [IX_StudentAssessmentRegistration_AggregateId] ON [edfi].[StudentAssessmentRegistration] (AggregateId);

CREATE SEQUENCE [edfi].[StudentAssessmentRegistrationBatteryPartAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[StudentAssessmentRegistrationBatteryPartAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAssessmentRegistrationBatteryPartAssociation_AggSeq];
CREATE INDEX [IX_StudentAssessmentRegistrationBatteryPartAssociation_AggregateId] ON [edfi].[StudentAssessmentRegistrationBatteryPartAssociation] (AggregateId);

CREATE SEQUENCE [edfi].[StudentCohortAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[StudentCohortAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentCohortAssociation_AggSeq];
CREATE INDEX [IX_StudentCohortAssociation_AggregateId] ON [edfi].[StudentCohortAssociation] (AggregateId);
Expand All @@ -359,6 +379,10 @@ CREATE SEQUENCE [edfi].[StudentDisciplineIncidentNonOffenderAssociation_AggSeq]
ALTER TABLE [edfi].[StudentDisciplineIncidentNonOffenderAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentDisciplineIncidentNonOffenderAssociation_AggSeq];
CREATE INDEX [IX_StudentDisciplineIncidentNonOffenderAssociation_AggregateId] ON [edfi].[StudentDisciplineIncidentNonOffenderAssociation] (AggregateId);

CREATE SEQUENCE [edfi].[StudentEducationOrganizationAssessmentAccommodation_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[StudentEducationOrganizationAssessmentAccommodation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentEducationOrganizationAssessmentAccommodation_AggSeq];
CREATE INDEX [IX_StudentEducationOrganizationAssessmentAccommodation_AggregateId] ON [edfi].[StudentEducationOrganizationAssessmentAccommodation] (AggregateId);

CREATE SEQUENCE [edfi].[StudentEducationOrganizationAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1;
ALTER TABLE [edfi].[StudentEducationOrganizationAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentEducationOrganizationAssociation_AggSeq];
CREATE INDEX [IX_StudentEducationOrganizationAssociation_AggregateId] ON [edfi].[StudentEducationOrganizationAssociation] (AggregateId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ ALTER TABLE [edfi].[Assessment] ADD CONSTRAINT Assessment_DF_ChangeVersion DEFAU
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[AssessmentAdministration]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[AssessmentAdministration] ADD [ChangeVersion] [BIGINT] CONSTRAINT AssessmentAdministration_DF_ChangeVersion DEFAULT (0) NOT NULL;
ALTER TABLE [edfi].[AssessmentAdministration] DROP CONSTRAINT AssessmentAdministration_DF_ChangeVersion;
ALTER TABLE [edfi].[AssessmentAdministration] ADD CONSTRAINT AssessmentAdministration_DF_ChangeVersion DEFAULT (NEXT VALUE FOR [changes].[ChangeVersionSequence]) For [ChangeVersion];
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[AssessmentBatteryPart]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[AssessmentBatteryPart] ADD [ChangeVersion] [BIGINT] CONSTRAINT AssessmentBatteryPart_DF_ChangeVersion DEFAULT (0) NOT NULL;
ALTER TABLE [edfi].[AssessmentBatteryPart] DROP CONSTRAINT AssessmentBatteryPart_DF_ChangeVersion;
ALTER TABLE [edfi].[AssessmentBatteryPart] ADD CONSTRAINT AssessmentBatteryPart_DF_ChangeVersion DEFAULT (NEXT VALUE FOR [changes].[ChangeVersionSequence]) For [ChangeVersion];
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[AssessmentItem]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[AssessmentItem] ADD [ChangeVersion] [BIGINT] CONSTRAINT AssessmentItem_DF_ChangeVersion DEFAULT (0) NOT NULL;
Expand All @@ -45,6 +61,14 @@ ALTER TABLE [edfi].[AssessmentScoreRangeLearningStandard] ADD CONSTRAINT Assessm
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[AssesssmentAdministrationParticipation]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[AssesssmentAdministrationParticipation] ADD [ChangeVersion] [BIGINT] CONSTRAINT AssesssmentAdministrationParticipation_DF_ChangeVersion DEFAULT (0) NOT NULL;
ALTER TABLE [edfi].[AssesssmentAdministrationParticipation] DROP CONSTRAINT AssesssmentAdministrationParticipation_DF_ChangeVersion;
ALTER TABLE [edfi].[AssesssmentAdministrationParticipation] ADD CONSTRAINT AssesssmentAdministrationParticipation_DF_ChangeVersion DEFAULT (NEXT VALUE FOR [changes].[ChangeVersionSequence]) For [ChangeVersion];
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[BalanceSheetDimension]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[BalanceSheetDimension] ADD [ChangeVersion] [BIGINT] CONSTRAINT BalanceSheetDimension_DF_ChangeVersion DEFAULT (0) NOT NULL;
Expand Down Expand Up @@ -677,6 +701,22 @@ ALTER TABLE [edfi].[StudentAssessmentEducationOrganizationAssociation] ADD CONST
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[StudentAssessmentRegistration]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[StudentAssessmentRegistration] ADD [ChangeVersion] [BIGINT] CONSTRAINT StudentAssessmentRegistration_DF_ChangeVersion DEFAULT (0) NOT NULL;
ALTER TABLE [edfi].[StudentAssessmentRegistration] DROP CONSTRAINT StudentAssessmentRegistration_DF_ChangeVersion;
ALTER TABLE [edfi].[StudentAssessmentRegistration] ADD CONSTRAINT StudentAssessmentRegistration_DF_ChangeVersion DEFAULT (NEXT VALUE FOR [changes].[ChangeVersionSequence]) For [ChangeVersion];
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[StudentAssessmentRegistrationBatteryPartAssociation]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[StudentAssessmentRegistrationBatteryPartAssociation] ADD [ChangeVersion] [BIGINT] CONSTRAINT StudentAssessmentRegistrationBatteryPartAssociation_DF_ChangeVersion DEFAULT (0) NOT NULL;
ALTER TABLE [edfi].[StudentAssessmentRegistrationBatteryPartAssociation] DROP CONSTRAINT StudentAssessmentRegistrationBatteryPartAssociation_DF_ChangeVersion;
ALTER TABLE [edfi].[StudentAssessmentRegistrationBatteryPartAssociation] ADD CONSTRAINT StudentAssessmentRegistrationBatteryPartAssociation_DF_ChangeVersion DEFAULT (NEXT VALUE FOR [changes].[ChangeVersionSequence]) For [ChangeVersion];
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[StudentCohortAssociation]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[StudentCohortAssociation] ADD [ChangeVersion] [BIGINT] CONSTRAINT StudentCohortAssociation_DF_ChangeVersion DEFAULT (0) NOT NULL;
Expand Down Expand Up @@ -717,6 +757,14 @@ ALTER TABLE [edfi].[StudentDisciplineIncidentNonOffenderAssociation] ADD CONSTRA
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[StudentEducationOrganizationAssessmentAccommodation]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[StudentEducationOrganizationAssessmentAccommodation] ADD [ChangeVersion] [BIGINT] CONSTRAINT StudentEducationOrganizationAssessmentAccommodation_DF_ChangeVersion DEFAULT (0) NOT NULL;
ALTER TABLE [edfi].[StudentEducationOrganizationAssessmentAccommodation] DROP CONSTRAINT StudentEducationOrganizationAssessmentAccommodation_DF_ChangeVersion;
ALTER TABLE [edfi].[StudentEducationOrganizationAssessmentAccommodation] ADD CONSTRAINT StudentEducationOrganizationAssessmentAccommodation_DF_ChangeVersion DEFAULT (NEXT VALUE FOR [changes].[ChangeVersionSequence]) For [ChangeVersion];
END


IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[edfi].[StudentEducationOrganizationAssociation]') AND name = 'ChangeVersion')
BEGIN
ALTER TABLE [edfi].[StudentEducationOrganizationAssociation] ADD [ChangeVersion] [BIGINT] CONSTRAINT StudentEducationOrganizationAssociation_DF_ChangeVersion DEFAULT (0) NOT NULL;
Expand Down
Loading

0 comments on commit 0ab7d46

Please sign in to comment.