From dce30eebeb7e1a992e4ab447694c789cfed40edf Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Thu, 26 Sep 2024 10:28:10 -0500 Subject: [PATCH 1/6] 5.1.0 Folder Removed --- .../Structure/Ods/1460-UpdateVersionTo73.sql | 18 - .../Ods/1470-Add-AggregateId-columns.sql | 477 ----------------- .../Structure/Ods/1460-UpdateVersionTo73.sql | 11 - .../Ods/1470-Add-AggregateId-columns.sql | 479 ------------------ 4 files changed, 985 deletions(-) delete mode 100644 Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1460-UpdateVersionTo73.sql delete mode 100644 Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql delete mode 100644 Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1460-UpdateVersionTo73.sql delete mode 100644 Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql diff --git a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1460-UpdateVersionTo73.sql b/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1460-UpdateVersionTo73.sql deleted file mode 100644 index fdac1ede0..000000000 --- a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1460-UpdateVersionTo73.sql +++ /dev/null @@ -1,18 +0,0 @@ --- SPDX-License-Identifier: Apache-2.0 --- Licensed to the Ed-Fi Alliance under one or more agreements. --- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. --- See the LICENSE and NOTICES files in the project root for more information. - -IF object_id('util.GetEdFiOdsVersion', 'FN') IS NOT NULL -BEGIN - DROP FUNCTION util.GetEdFiOdsVersion; -END -GO - -CREATE FUNCTION util.GetEdFiOdsVersion() -RETURNS VARCHAR(60) -AS -BEGIN - RETURN '7.3' -END -GO \ No newline at end of file diff --git a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql b/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql deleted file mode 100644 index 0cad76479..000000000 --- a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql +++ /dev/null @@ -1,477 +0,0 @@ --- SPDX-License-Identifier: Apache-2.0 --- Licensed to the Ed-Fi Alliance under one or more agreements. --- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. --- See the LICENSE and NOTICES files in the project root for more information. - -/* Generated with SSMS using: ------------------------------------------------- - SELECT 'CREATE SEQUENCE [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '_AggSeq] START WITH -2147483648 INCREMENT BY 1; ALTER TABLE [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '_AggSeq]; CREATE INDEX [IX_' + c.TABLE_NAME + '_AggregateId] ON [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '] (AggregateId);' AS SqlServer - FROM INFORMATION_SCHEMA.COLUMNS c - WHERE c.COLUMN_NAME = 'Id' and c.TABLE_SCHEMA = @schema - ORDER BY c.TABLE_SCHEMA, c.TABLE_NAME ------------------------------------------------- -*/ - -CREATE SEQUENCE [edfi].[AcademicWeek_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[AcademicWeek] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AcademicWeek_AggSeq]; -CREATE INDEX [IX_AcademicWeek_AggregateId] ON [edfi].[AcademicWeek] (AggregateId); - -CREATE SEQUENCE [edfi].[AccountabilityRating_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[AccountabilityRating] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AccountabilityRating_AggSeq]; -CREATE INDEX [IX_AccountabilityRating_AggregateId] ON [edfi].[AccountabilityRating] (AggregateId); - -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].[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); - -CREATE SEQUENCE [edfi].[AssessmentScoreRangeLearningStandard_AggSeq] START WITH -2147483648 INCREMENT BY 1; -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].[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); - -CREATE SEQUENCE [edfi].[BellSchedule_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[BellSchedule] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[BellSchedule_AggSeq]; -CREATE INDEX [IX_BellSchedule_AggregateId] ON [edfi].[BellSchedule] (AggregateId); - -CREATE SEQUENCE [edfi].[Calendar_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Calendar] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Calendar_AggSeq]; -CREATE INDEX [IX_Calendar_AggregateId] ON [edfi].[Calendar] (AggregateId); - -CREATE SEQUENCE [edfi].[CalendarDate_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[CalendarDate] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CalendarDate_AggSeq]; -CREATE INDEX [IX_CalendarDate_AggregateId] ON [edfi].[CalendarDate] (AggregateId); - -CREATE SEQUENCE [edfi].[ChartOfAccount_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ChartOfAccount] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ChartOfAccount_AggSeq]; -CREATE INDEX [IX_ChartOfAccount_AggregateId] ON [edfi].[ChartOfAccount] (AggregateId); - -CREATE SEQUENCE [edfi].[ClassPeriod_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ClassPeriod] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ClassPeriod_AggSeq]; -CREATE INDEX [IX_ClassPeriod_AggregateId] ON [edfi].[ClassPeriod] (AggregateId); - -CREATE SEQUENCE [edfi].[Cohort_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Cohort] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Cohort_AggSeq]; -CREATE INDEX [IX_Cohort_AggregateId] ON [edfi].[Cohort] (AggregateId); - -CREATE SEQUENCE [edfi].[CommunityProviderLicense_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[CommunityProviderLicense] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CommunityProviderLicense_AggSeq]; -CREATE INDEX [IX_CommunityProviderLicense_AggregateId] ON [edfi].[CommunityProviderLicense] (AggregateId); - -CREATE SEQUENCE [edfi].[CompetencyObjective_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[CompetencyObjective] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CompetencyObjective_AggSeq]; -CREATE INDEX [IX_CompetencyObjective_AggregateId] ON [edfi].[CompetencyObjective] (AggregateId); - -CREATE SEQUENCE [edfi].[Contact_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Contact] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Contact_AggSeq]; -CREATE INDEX [IX_Contact_AggregateId] ON [edfi].[Contact] (AggregateId); - -CREATE SEQUENCE [edfi].[Course_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Course] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Course_AggSeq]; -CREATE INDEX [IX_Course_AggregateId] ON [edfi].[Course] (AggregateId); - -CREATE SEQUENCE [edfi].[CourseOffering_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[CourseOffering] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CourseOffering_AggSeq]; -CREATE INDEX [IX_CourseOffering_AggregateId] ON [edfi].[CourseOffering] (AggregateId); - -CREATE SEQUENCE [edfi].[CourseTranscript_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[CourseTranscript] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CourseTranscript_AggSeq]; -CREATE INDEX [IX_CourseTranscript_AggregateId] ON [edfi].[CourseTranscript] (AggregateId); - -CREATE SEQUENCE [edfi].[Credential_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Credential] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Credential_AggSeq]; -CREATE INDEX [IX_Credential_AggregateId] ON [edfi].[Credential] (AggregateId); - -CREATE SEQUENCE [edfi].[CrisisEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[CrisisEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CrisisEvent_AggSeq]; -CREATE INDEX [IX_CrisisEvent_AggregateId] ON [edfi].[CrisisEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[Descriptor_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Descriptor] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Descriptor_AggSeq]; -CREATE INDEX [IX_Descriptor_AggregateId] ON [edfi].[Descriptor] (AggregateId); - -CREATE SEQUENCE [edfi].[DescriptorMapping_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[DescriptorMapping] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[DescriptorMapping_AggSeq]; -CREATE INDEX [IX_DescriptorMapping_AggregateId] ON [edfi].[DescriptorMapping] (AggregateId); - -CREATE SEQUENCE [edfi].[DisciplineAction_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[DisciplineAction] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[DisciplineAction_AggSeq]; -CREATE INDEX [IX_DisciplineAction_AggregateId] ON [edfi].[DisciplineAction] (AggregateId); - -CREATE SEQUENCE [edfi].[DisciplineIncident_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[DisciplineIncident] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[DisciplineIncident_AggSeq]; -CREATE INDEX [IX_DisciplineIncident_AggregateId] ON [edfi].[DisciplineIncident] (AggregateId); - -CREATE SEQUENCE [edfi].[EducationContent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[EducationContent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationContent_AggSeq]; -CREATE INDEX [IX_EducationContent_AggregateId] ON [edfi].[EducationContent] (AggregateId); - -CREATE SEQUENCE [edfi].[EducationOrganization_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[EducationOrganization] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganization_AggSeq]; -CREATE INDEX [IX_EducationOrganization_AggregateId] ON [edfi].[EducationOrganization] (AggregateId); - -CREATE SEQUENCE [edfi].[EducationOrganizationInterventionPrescriptionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[EducationOrganizationInterventionPrescriptionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganizationInterventionPrescriptionAssociation_AggSeq]; -CREATE INDEX [IX_EducationOrganizationInterventionPrescriptionAssociation_AggregateId] ON [edfi].[EducationOrganizationInterventionPrescriptionAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[EducationOrganizationNetworkAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[EducationOrganizationNetworkAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganizationNetworkAssociation_AggSeq]; -CREATE INDEX [IX_EducationOrganizationNetworkAssociation_AggregateId] ON [edfi].[EducationOrganizationNetworkAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[EducationOrganizationPeerAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[EducationOrganizationPeerAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganizationPeerAssociation_AggSeq]; -CREATE INDEX [IX_EducationOrganizationPeerAssociation_AggregateId] ON [edfi].[EducationOrganizationPeerAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[EvaluationRubricDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[EvaluationRubricDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EvaluationRubricDimension_AggSeq]; -CREATE INDEX [IX_EvaluationRubricDimension_AggregateId] ON [edfi].[EvaluationRubricDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[FeederSchoolAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[FeederSchoolAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[FeederSchoolAssociation_AggSeq]; -CREATE INDEX [IX_FeederSchoolAssociation_AggregateId] ON [edfi].[FeederSchoolAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[FunctionDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[FunctionDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[FunctionDimension_AggSeq]; -CREATE INDEX [IX_FunctionDimension_AggregateId] ON [edfi].[FunctionDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[FundDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[FundDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[FundDimension_AggSeq]; -CREATE INDEX [IX_FundDimension_AggregateId] ON [edfi].[FundDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[GeneralStudentProgramAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[GeneralStudentProgramAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GeneralStudentProgramAssociation_AggSeq]; -CREATE INDEX [IX_GeneralStudentProgramAssociation_AggregateId] ON [edfi].[GeneralStudentProgramAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[Grade_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Grade] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Grade_AggSeq]; -CREATE INDEX [IX_Grade_AggregateId] ON [edfi].[Grade] (AggregateId); - -CREATE SEQUENCE [edfi].[GradebookEntry_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[GradebookEntry] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GradebookEntry_AggSeq]; -CREATE INDEX [IX_GradebookEntry_AggregateId] ON [edfi].[GradebookEntry] (AggregateId); - -CREATE SEQUENCE [edfi].[GradingPeriod_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[GradingPeriod] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GradingPeriod_AggSeq]; -CREATE INDEX [IX_GradingPeriod_AggregateId] ON [edfi].[GradingPeriod] (AggregateId); - -CREATE SEQUENCE [edfi].[GraduationPlan_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[GraduationPlan] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GraduationPlan_AggSeq]; -CREATE INDEX [IX_GraduationPlan_AggregateId] ON [edfi].[GraduationPlan] (AggregateId); - -CREATE SEQUENCE [edfi].[Intervention_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Intervention] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Intervention_AggSeq]; -CREATE INDEX [IX_Intervention_AggregateId] ON [edfi].[Intervention] (AggregateId); - -CREATE SEQUENCE [edfi].[InterventionPrescription_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[InterventionPrescription] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[InterventionPrescription_AggSeq]; -CREATE INDEX [IX_InterventionPrescription_AggregateId] ON [edfi].[InterventionPrescription] (AggregateId); - -CREATE SEQUENCE [edfi].[InterventionStudy_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[InterventionStudy] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[InterventionStudy_AggSeq]; -CREATE INDEX [IX_InterventionStudy_AggregateId] ON [edfi].[InterventionStudy] (AggregateId); - -CREATE SEQUENCE [edfi].[LearningStandard_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LearningStandard] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LearningStandard_AggSeq]; -CREATE INDEX [IX_LearningStandard_AggregateId] ON [edfi].[LearningStandard] (AggregateId); - -CREATE SEQUENCE [edfi].[LearningStandardEquivalenceAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LearningStandardEquivalenceAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LearningStandardEquivalenceAssociation_AggSeq]; -CREATE INDEX [IX_LearningStandardEquivalenceAssociation_AggregateId] ON [edfi].[LearningStandardEquivalenceAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[LocalAccount_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LocalAccount] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalAccount_AggSeq]; -CREATE INDEX [IX_LocalAccount_AggregateId] ON [edfi].[LocalAccount] (AggregateId); - -CREATE SEQUENCE [edfi].[LocalActual_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LocalActual] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalActual_AggSeq]; -CREATE INDEX [IX_LocalActual_AggregateId] ON [edfi].[LocalActual] (AggregateId); - -CREATE SEQUENCE [edfi].[LocalBudget_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LocalBudget] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalBudget_AggSeq]; -CREATE INDEX [IX_LocalBudget_AggregateId] ON [edfi].[LocalBudget] (AggregateId); - -CREATE SEQUENCE [edfi].[LocalContractedStaff_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LocalContractedStaff] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalContractedStaff_AggSeq]; -CREATE INDEX [IX_LocalContractedStaff_AggregateId] ON [edfi].[LocalContractedStaff] (AggregateId); - -CREATE SEQUENCE [edfi].[LocalEncumbrance_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LocalEncumbrance] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalEncumbrance_AggSeq]; -CREATE INDEX [IX_LocalEncumbrance_AggregateId] ON [edfi].[LocalEncumbrance] (AggregateId); - -CREATE SEQUENCE [edfi].[LocalPayroll_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[LocalPayroll] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalPayroll_AggSeq]; -CREATE INDEX [IX_LocalPayroll_AggregateId] ON [edfi].[LocalPayroll] (AggregateId); - -CREATE SEQUENCE [edfi].[Location_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Location] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Location_AggSeq]; -CREATE INDEX [IX_Location_AggregateId] ON [edfi].[Location] (AggregateId); - -CREATE SEQUENCE [edfi].[ObjectDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ObjectDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ObjectDimension_AggSeq]; -CREATE INDEX [IX_ObjectDimension_AggregateId] ON [edfi].[ObjectDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[ObjectiveAssessment_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ObjectiveAssessment] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ObjectiveAssessment_AggSeq]; -CREATE INDEX [IX_ObjectiveAssessment_AggregateId] ON [edfi].[ObjectiveAssessment] (AggregateId); - -CREATE SEQUENCE [edfi].[OpenStaffPosition_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[OpenStaffPosition] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[OpenStaffPosition_AggSeq]; -CREATE INDEX [IX_OpenStaffPosition_AggregateId] ON [edfi].[OpenStaffPosition] (AggregateId); - -CREATE SEQUENCE [edfi].[OperationalUnitDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[OperationalUnitDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[OperationalUnitDimension_AggSeq]; -CREATE INDEX [IX_OperationalUnitDimension_AggregateId] ON [edfi].[OperationalUnitDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[Person_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Person] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Person_AggSeq]; -CREATE INDEX [IX_Person_AggregateId] ON [edfi].[Person] (AggregateId); - -CREATE SEQUENCE [edfi].[PostSecondaryEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[PostSecondaryEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[PostSecondaryEvent_AggSeq]; -CREATE INDEX [IX_PostSecondaryEvent_AggregateId] ON [edfi].[PostSecondaryEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[Program_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Program] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Program_AggSeq]; -CREATE INDEX [IX_Program_AggregateId] ON [edfi].[Program] (AggregateId); - -CREATE SEQUENCE [edfi].[ProgramDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ProgramDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramDimension_AggSeq]; -CREATE INDEX [IX_ProgramDimension_AggregateId] ON [edfi].[ProgramDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[ProgramEvaluation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ProgramEvaluation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramEvaluation_AggSeq]; -CREATE INDEX [IX_ProgramEvaluation_AggregateId] ON [edfi].[ProgramEvaluation] (AggregateId); - -CREATE SEQUENCE [edfi].[ProgramEvaluationElement_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ProgramEvaluationElement] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramEvaluationElement_AggSeq]; -CREATE INDEX [IX_ProgramEvaluationElement_AggregateId] ON [edfi].[ProgramEvaluationElement] (AggregateId); - -CREATE SEQUENCE [edfi].[ProgramEvaluationObjective_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ProgramEvaluationObjective] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramEvaluationObjective_AggSeq]; -CREATE INDEX [IX_ProgramEvaluationObjective_AggregateId] ON [edfi].[ProgramEvaluationObjective] (AggregateId); - -CREATE SEQUENCE [edfi].[ProjectDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ProjectDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProjectDimension_AggSeq]; -CREATE INDEX [IX_ProjectDimension_AggregateId] ON [edfi].[ProjectDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[ReportCard_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[ReportCard] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ReportCard_AggSeq]; -CREATE INDEX [IX_ReportCard_AggregateId] ON [edfi].[ReportCard] (AggregateId); - -CREATE SEQUENCE [edfi].[RestraintEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[RestraintEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[RestraintEvent_AggSeq]; -CREATE INDEX [IX_RestraintEvent_AggregateId] ON [edfi].[RestraintEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[SchoolYearType_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SchoolYearType] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SchoolYearType_AggSeq]; -CREATE INDEX [IX_SchoolYearType_AggregateId] ON [edfi].[SchoolYearType] (AggregateId); - -CREATE SEQUENCE [edfi].[Section_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Section] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Section_AggSeq]; -CREATE INDEX [IX_Section_AggregateId] ON [edfi].[Section] (AggregateId); - -CREATE SEQUENCE [edfi].[SectionAttendanceTakenEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SectionAttendanceTakenEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SectionAttendanceTakenEvent_AggSeq]; -CREATE INDEX [IX_SectionAttendanceTakenEvent_AggregateId] ON [edfi].[SectionAttendanceTakenEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[Session_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Session] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Session_AggSeq]; -CREATE INDEX [IX_Session_AggregateId] ON [edfi].[Session] (AggregateId); - -CREATE SEQUENCE [edfi].[SourceDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SourceDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SourceDimension_AggSeq]; -CREATE INDEX [IX_SourceDimension_AggregateId] ON [edfi].[SourceDimension] (AggregateId); - -CREATE SEQUENCE [edfi].[Staff_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Staff] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Staff_AggSeq]; -CREATE INDEX [IX_Staff_AggregateId] ON [edfi].[Staff] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffAbsenceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffAbsenceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffAbsenceEvent_AggSeq]; -CREATE INDEX [IX_StaffAbsenceEvent_AggregateId] ON [edfi].[StaffAbsenceEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffCohortAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffCohortAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffCohortAssociation_AggSeq]; -CREATE INDEX [IX_StaffCohortAssociation_AggregateId] ON [edfi].[StaffCohortAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffDisciplineIncidentAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffDisciplineIncidentAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffDisciplineIncidentAssociation_AggSeq]; -CREATE INDEX [IX_StaffDisciplineIncidentAssociation_AggregateId] ON [edfi].[StaffDisciplineIncidentAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffEducationOrganizationAssignmentAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffEducationOrganizationAssignmentAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffEducationOrganizationAssignmentAssociation_AggSeq]; -CREATE INDEX [IX_StaffEducationOrganizationAssignmentAssociation_AggregateId] ON [edfi].[StaffEducationOrganizationAssignmentAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffEducationOrganizationContactAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffEducationOrganizationContactAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffEducationOrganizationContactAssociation_AggSeq]; -CREATE INDEX [IX_StaffEducationOrganizationContactAssociation_AggregateId] ON [edfi].[StaffEducationOrganizationContactAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffEducationOrganizationEmploymentAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffEducationOrganizationEmploymentAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffEducationOrganizationEmploymentAssociation_AggSeq]; -CREATE INDEX [IX_StaffEducationOrganizationEmploymentAssociation_AggregateId] ON [edfi].[StaffEducationOrganizationEmploymentAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffLeave_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffLeave] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffLeave_AggSeq]; -CREATE INDEX [IX_StaffLeave_AggregateId] ON [edfi].[StaffLeave] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffProgramAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffProgramAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffProgramAssociation_AggSeq]; -CREATE INDEX [IX_StaffProgramAssociation_AggregateId] ON [edfi].[StaffProgramAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffSchoolAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffSchoolAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffSchoolAssociation_AggSeq]; -CREATE INDEX [IX_StaffSchoolAssociation_AggregateId] ON [edfi].[StaffSchoolAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StaffSectionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StaffSectionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffSectionAssociation_AggSeq]; -CREATE INDEX [IX_StaffSectionAssociation_AggregateId] ON [edfi].[StaffSectionAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[Student_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Student] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Student_AggSeq]; -CREATE INDEX [IX_Student_AggregateId] ON [edfi].[Student] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentAcademicRecord_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentAcademicRecord] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAcademicRecord_AggSeq]; -CREATE INDEX [IX_StudentAcademicRecord_AggregateId] ON [edfi].[StudentAcademicRecord] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentAssessment_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentAssessment] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAssessment_AggSeq]; -CREATE INDEX [IX_StudentAssessment_AggregateId] ON [edfi].[StudentAssessment] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentAssessmentEducationOrganizationAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -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].[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); - -CREATE SEQUENCE [edfi].[StudentCompetencyObjective_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentCompetencyObjective] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentCompetencyObjective_AggSeq]; -CREATE INDEX [IX_StudentCompetencyObjective_AggregateId] ON [edfi].[StudentCompetencyObjective] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentContactAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentContactAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentContactAssociation_AggSeq]; -CREATE INDEX [IX_StudentContactAssociation_AggregateId] ON [edfi].[StudentContactAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentDisciplineIncidentBehaviorAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentDisciplineIncidentBehaviorAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentDisciplineIncidentBehaviorAssociation_AggSeq]; -CREATE INDEX [IX_StudentDisciplineIncidentBehaviorAssociation_AggregateId] ON [edfi].[StudentDisciplineIncidentBehaviorAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentDisciplineIncidentNonOffenderAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -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].[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); - -CREATE SEQUENCE [edfi].[StudentEducationOrganizationResponsibilityAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentEducationOrganizationResponsibilityAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentEducationOrganizationResponsibilityAssociation_AggSeq]; -CREATE INDEX [IX_StudentEducationOrganizationResponsibilityAssociation_AggregateId] ON [edfi].[StudentEducationOrganizationResponsibilityAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentGradebookEntry_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentGradebookEntry] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentGradebookEntry_AggSeq]; -CREATE INDEX [IX_StudentGradebookEntry_AggregateId] ON [edfi].[StudentGradebookEntry] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentHealth_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentHealth] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentHealth_AggSeq]; -CREATE INDEX [IX_StudentHealth_AggregateId] ON [edfi].[StudentHealth] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentInterventionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentInterventionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentInterventionAssociation_AggSeq]; -CREATE INDEX [IX_StudentInterventionAssociation_AggregateId] ON [edfi].[StudentInterventionAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentInterventionAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentInterventionAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentInterventionAttendanceEvent_AggSeq]; -CREATE INDEX [IX_StudentInterventionAttendanceEvent_AggregateId] ON [edfi].[StudentInterventionAttendanceEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentProgramAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentProgramAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentProgramAttendanceEvent_AggSeq]; -CREATE INDEX [IX_StudentProgramAttendanceEvent_AggregateId] ON [edfi].[StudentProgramAttendanceEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentProgramEvaluation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentProgramEvaluation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentProgramEvaluation_AggSeq]; -CREATE INDEX [IX_StudentProgramEvaluation_AggregateId] ON [edfi].[StudentProgramEvaluation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentSchoolAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentSchoolAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSchoolAssociation_AggSeq]; -CREATE INDEX [IX_StudentSchoolAssociation_AggregateId] ON [edfi].[StudentSchoolAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentSchoolAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentSchoolAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSchoolAttendanceEvent_AggSeq]; -CREATE INDEX [IX_StudentSchoolAttendanceEvent_AggregateId] ON [edfi].[StudentSchoolAttendanceEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentSectionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentSectionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSectionAssociation_AggSeq]; -CREATE INDEX [IX_StudentSectionAssociation_AggregateId] ON [edfi].[StudentSectionAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentSectionAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentSectionAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSectionAttendanceEvent_AggSeq]; -CREATE INDEX [IX_StudentSectionAttendanceEvent_AggregateId] ON [edfi].[StudentSectionAttendanceEvent] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentSpecialEducationProgramEligibilityAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentSpecialEducationProgramEligibilityAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSpecialEducationProgramEligibilityAssociation_AggSeq]; -CREATE INDEX [IX_StudentSpecialEducationProgramEligibilityAssociation_AggregateId] ON [edfi].[StudentSpecialEducationProgramEligibilityAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[StudentTransportation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[StudentTransportation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentTransportation_AggSeq]; -CREATE INDEX [IX_StudentTransportation_AggregateId] ON [edfi].[StudentTransportation] (AggregateId); - -CREATE SEQUENCE [edfi].[Survey_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[Survey] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Survey_AggSeq]; -CREATE INDEX [IX_Survey_AggregateId] ON [edfi].[Survey] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyCourseAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyCourseAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyCourseAssociation_AggSeq]; -CREATE INDEX [IX_SurveyCourseAssociation_AggregateId] ON [edfi].[SurveyCourseAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyProgramAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyProgramAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyProgramAssociation_AggSeq]; -CREATE INDEX [IX_SurveyProgramAssociation_AggregateId] ON [edfi].[SurveyProgramAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyQuestion_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyQuestion] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyQuestion_AggSeq]; -CREATE INDEX [IX_SurveyQuestion_AggregateId] ON [edfi].[SurveyQuestion] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyQuestionResponse_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyQuestionResponse] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyQuestionResponse_AggSeq]; -CREATE INDEX [IX_SurveyQuestionResponse_AggregateId] ON [edfi].[SurveyQuestionResponse] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyResponse_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyResponse] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyResponse_AggSeq]; -CREATE INDEX [IX_SurveyResponse_AggregateId] ON [edfi].[SurveyResponse] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyResponseEducationOrganizationTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyResponseEducationOrganizationTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyResponseEducationOrganizationTargetAssociation_AggSeq]; -CREATE INDEX [IX_SurveyResponseEducationOrganizationTargetAssociation_AggregateId] ON [edfi].[SurveyResponseEducationOrganizationTargetAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveyResponseStaffTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveyResponseStaffTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyResponseStaffTargetAssociation_AggSeq]; -CREATE INDEX [IX_SurveyResponseStaffTargetAssociation_AggregateId] ON [edfi].[SurveyResponseStaffTargetAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveySection_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveySection] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySection_AggSeq]; -CREATE INDEX [IX_SurveySection_AggregateId] ON [edfi].[SurveySection] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveySectionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveySectionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionAssociation_AggSeq]; -CREATE INDEX [IX_SurveySectionAssociation_AggregateId] ON [edfi].[SurveySectionAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveySectionResponse_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveySectionResponse] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionResponse_AggSeq]; -CREATE INDEX [IX_SurveySectionResponse_AggregateId] ON [edfi].[SurveySectionResponse] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation_AggSeq]; -CREATE INDEX [IX_SurveySectionResponseEducationOrganizationTargetAssociation_AggregateId] ON [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation] (AggregateId); - -CREATE SEQUENCE [edfi].[SurveySectionResponseStaffTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; -ALTER TABLE [edfi].[SurveySectionResponseStaffTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionResponseStaffTargetAssociation_AggSeq]; -CREATE INDEX [IX_SurveySectionResponseStaffTargetAssociation_AggregateId] ON [edfi].[SurveySectionResponseStaffTargetAssociation] (AggregateId); diff --git a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1460-UpdateVersionTo73.sql b/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1460-UpdateVersionTo73.sql deleted file mode 100644 index d5163f799..000000000 --- a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1460-UpdateVersionTo73.sql +++ /dev/null @@ -1,11 +0,0 @@ --- SPDX-License-Identifier: Apache-2.0 --- Licensed to the Ed-Fi Alliance under one or more agreements. --- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. --- See the LICENSE and NOTICES files in the project root for more information. - -CREATE OR REPLACE FUNCTION util.GetEdFiOdsVersion() -RETURNS VARCHAR(60) AS $$ -BEGIN - RETURN '7.3'; -END; -$$ LANGUAGE plpgsql; \ No newline at end of file diff --git a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql b/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql deleted file mode 100644 index 2210a4436..000000000 --- a/Application/EdFi.Ods.Standard/Standard/5.1.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql +++ /dev/null @@ -1,479 +0,0 @@ --- SPDX-License-Identifier: Apache-2.0 --- Licensed to the Ed-Fi Alliance under one or more agreements. --- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. --- See the LICENSE and NOTICES files in the project root for more information. - -/* Generated with SSMS using: ------------------------------------------------- - SELECT 'CREATE SEQUENCE ' + LOWER(c.TABLE_SCHEMA) + '.' + LOWER(c.TABLE_NAME) + '_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; - ALTER TABLE ' + c.TABLE_SCHEMA + '.' + c.TABLE_NAME + ' ADD COLUMN AggregateId int NOT NULL DEFAULT nextval(''' + LOWER(c.TABLE_SCHEMA) + '.' + LOWER(c.TABLE_NAME) + '_aggseq''); - CREATE INDEX ix_' + LOWER(c.TABLE_NAME) + '_aggid ON ' + c.TABLE_SCHEMA + '.' + c.TABLE_NAME + ' (AggregateId);' AS PostgreSQL - FROM INFORMATION_SCHEMA.COLUMNS c - WHERE c.COLUMN_NAME = 'Id' and c.TABLE_SCHEMA = @schema - ORDER BY c.TABLE_SCHEMA, c.TABLE_NAME ------------------------------------------------- -*/ - -CREATE SEQUENCE edfi.academicweek_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.AcademicWeek ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.academicweek_aggseq'); -CREATE INDEX ix_academicweek_aggid ON edfi.AcademicWeek (AggregateId); - -CREATE SEQUENCE edfi.accountabilityrating_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.AccountabilityRating ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.accountabilityrating_aggseq'); -CREATE INDEX ix_accountabilityrating_aggid ON edfi.AccountabilityRating (AggregateId); - -CREATE SEQUENCE edfi.assessment_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Assessment ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.assessment_aggseq'); -CREATE INDEX ix_assessment_aggid ON edfi.Assessment (AggregateId); - -CREATE SEQUENCE edfi.assessmentitem_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.AssessmentItem ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.assessmentitem_aggseq'); -CREATE INDEX ix_assessmentitem_aggid ON edfi.AssessmentItem (AggregateId); - -CREATE SEQUENCE edfi.assessmentscorerangelearningstandard_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.AssessmentScoreRangeLearningStandard ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.assessmentscorerangelearningstandard_aggseq'); -CREATE INDEX ix_assessmentscorerangelearningstandard_aggid ON edfi.AssessmentScoreRangeLearningStandard (AggregateId); - -CREATE SEQUENCE edfi.balancesheetdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.BalanceSheetDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.balancesheetdimension_aggseq'); -CREATE INDEX ix_balancesheetdimension_aggid ON edfi.BalanceSheetDimension (AggregateId); - -CREATE SEQUENCE edfi.bellschedule_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.BellSchedule ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.bellschedule_aggseq'); -CREATE INDEX ix_bellschedule_aggid ON edfi.BellSchedule (AggregateId); - -CREATE SEQUENCE edfi.calendar_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Calendar ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.calendar_aggseq'); -CREATE INDEX ix_calendar_aggid ON edfi.Calendar (AggregateId); - -CREATE SEQUENCE edfi.calendardate_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.CalendarDate ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.calendardate_aggseq'); -CREATE INDEX ix_calendardate_aggid ON edfi.CalendarDate (AggregateId); - -CREATE SEQUENCE edfi.chartofaccount_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ChartOfAccount ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.chartofaccount_aggseq'); -CREATE INDEX ix_chartofaccount_aggid ON edfi.ChartOfAccount (AggregateId); - -CREATE SEQUENCE edfi.classperiod_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ClassPeriod ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.classperiod_aggseq'); -CREATE INDEX ix_classperiod_aggid ON edfi.ClassPeriod (AggregateId); - -CREATE SEQUENCE edfi.cohort_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Cohort ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.cohort_aggseq'); -CREATE INDEX ix_cohort_aggid ON edfi.Cohort (AggregateId); - -CREATE SEQUENCE edfi.communityproviderlicense_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.CommunityProviderLicense ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.communityproviderlicense_aggseq'); -CREATE INDEX ix_communityproviderlicense_aggid ON edfi.CommunityProviderLicense (AggregateId); - -CREATE SEQUENCE edfi.competencyobjective_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.CompetencyObjective ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.competencyobjective_aggseq'); -CREATE INDEX ix_competencyobjective_aggid ON edfi.CompetencyObjective (AggregateId); - -CREATE SEQUENCE edfi.contact_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Contact ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.contact_aggseq'); -CREATE INDEX ix_contact_aggid ON edfi.Contact (AggregateId); - -CREATE SEQUENCE edfi.course_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Course ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.course_aggseq'); -CREATE INDEX ix_course_aggid ON edfi.Course (AggregateId); - -CREATE SEQUENCE edfi.courseoffering_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.CourseOffering ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.courseoffering_aggseq'); -CREATE INDEX ix_courseoffering_aggid ON edfi.CourseOffering (AggregateId); - -CREATE SEQUENCE edfi.coursetranscript_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.CourseTranscript ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.coursetranscript_aggseq'); -CREATE INDEX ix_coursetranscript_aggid ON edfi.CourseTranscript (AggregateId); - -CREATE SEQUENCE edfi.credential_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Credential ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.credential_aggseq'); -CREATE INDEX ix_credential_aggid ON edfi.Credential (AggregateId); - -CREATE SEQUENCE edfi.crisisevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.CrisisEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.crisisevent_aggseq'); -CREATE INDEX ix_crisisevent_aggid ON edfi.CrisisEvent (AggregateId); - -CREATE SEQUENCE edfi.descriptor_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Descriptor ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.descriptor_aggseq'); -CREATE INDEX ix_descriptor_aggid ON edfi.Descriptor (AggregateId); - -CREATE SEQUENCE edfi.descriptormapping_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.DescriptorMapping ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.descriptormapping_aggseq'); -CREATE INDEX ix_descriptormapping_aggid ON edfi.DescriptorMapping (AggregateId); - -CREATE SEQUENCE edfi.disciplineaction_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.DisciplineAction ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.disciplineaction_aggseq'); -CREATE INDEX ix_disciplineaction_aggid ON edfi.DisciplineAction (AggregateId); - -CREATE SEQUENCE edfi.disciplineincident_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.DisciplineIncident ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.disciplineincident_aggseq'); -CREATE INDEX ix_disciplineincident_aggid ON edfi.DisciplineIncident (AggregateId); - -CREATE SEQUENCE edfi.educationcontent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.EducationContent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationcontent_aggseq'); -CREATE INDEX ix_educationcontent_aggid ON edfi.EducationContent (AggregateId); - -CREATE SEQUENCE edfi.educationorganization_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.EducationOrganization ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganization_aggseq'); -CREATE INDEX ix_educationorganization_aggid ON edfi.EducationOrganization (AggregateId); - -CREATE SEQUENCE edfi.educationorganizationinterventionprescriptionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.EducationOrganizationInterventionPrescriptionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganizationinterventionprescriptionassociation_aggseq'); -CREATE INDEX ix_educationorganizationinterventionprescriptionassociation_aggid ON edfi.EducationOrganizationInterventionPrescriptionAssociation (AggregateId); - -CREATE SEQUENCE edfi.educationorganizationnetworkassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.EducationOrganizationNetworkAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganizationnetworkassociation_aggseq'); -CREATE INDEX ix_educationorganizationnetworkassociation_aggid ON edfi.EducationOrganizationNetworkAssociation (AggregateId); - -CREATE SEQUENCE edfi.educationorganizationpeerassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.EducationOrganizationPeerAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganizationpeerassociation_aggseq'); -CREATE INDEX ix_educationorganizationpeerassociation_aggid ON edfi.EducationOrganizationPeerAssociation (AggregateId); - -CREATE SEQUENCE edfi.evaluationrubricdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.EvaluationRubricDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.evaluationrubricdimension_aggseq'); -CREATE INDEX ix_evaluationrubricdimension_aggid ON edfi.EvaluationRubricDimension (AggregateId); - -CREATE SEQUENCE edfi.feederschoolassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.FeederSchoolAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.feederschoolassociation_aggseq'); -CREATE INDEX ix_feederschoolassociation_aggid ON edfi.FeederSchoolAssociation (AggregateId); - -CREATE SEQUENCE edfi.functiondimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.FunctionDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.functiondimension_aggseq'); -CREATE INDEX ix_functiondimension_aggid ON edfi.FunctionDimension (AggregateId); - -CREATE SEQUENCE edfi.funddimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.FundDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.funddimension_aggseq'); -CREATE INDEX ix_funddimension_aggid ON edfi.FundDimension (AggregateId); - -CREATE SEQUENCE edfi.generalstudentprogramassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.GeneralStudentProgramAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.generalstudentprogramassociation_aggseq'); -CREATE INDEX ix_generalstudentprogramassociation_aggid ON edfi.GeneralStudentProgramAssociation (AggregateId); - -CREATE SEQUENCE edfi.grade_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Grade ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.grade_aggseq'); -CREATE INDEX ix_grade_aggid ON edfi.Grade (AggregateId); - -CREATE SEQUENCE edfi.gradebookentry_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.GradebookEntry ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.gradebookentry_aggseq'); -CREATE INDEX ix_gradebookentry_aggid ON edfi.GradebookEntry (AggregateId); - -CREATE SEQUENCE edfi.gradingperiod_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.GradingPeriod ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.gradingperiod_aggseq'); -CREATE INDEX ix_gradingperiod_aggid ON edfi.GradingPeriod (AggregateId); - -CREATE SEQUENCE edfi.graduationplan_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.GraduationPlan ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.graduationplan_aggseq'); -CREATE INDEX ix_graduationplan_aggid ON edfi.GraduationPlan (AggregateId); - -CREATE SEQUENCE edfi.intervention_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Intervention ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.intervention_aggseq'); -CREATE INDEX ix_intervention_aggid ON edfi.Intervention (AggregateId); - -CREATE SEQUENCE edfi.interventionprescription_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.InterventionPrescription ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.interventionprescription_aggseq'); -CREATE INDEX ix_interventionprescription_aggid ON edfi.InterventionPrescription (AggregateId); - -CREATE SEQUENCE edfi.interventionstudy_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.InterventionStudy ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.interventionstudy_aggseq'); -CREATE INDEX ix_interventionstudy_aggid ON edfi.InterventionStudy (AggregateId); - -CREATE SEQUENCE edfi.learningstandard_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LearningStandard ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.learningstandard_aggseq'); -CREATE INDEX ix_learningstandard_aggid ON edfi.LearningStandard (AggregateId); - -CREATE SEQUENCE edfi.learningstandardequivalenceassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LearningStandardEquivalenceAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.learningstandardequivalenceassociation_aggseq'); -CREATE INDEX ix_learningstandardequivalenceassociation_aggid ON edfi.LearningStandardEquivalenceAssociation (AggregateId); - -CREATE SEQUENCE edfi.localaccount_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LocalAccount ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localaccount_aggseq'); -CREATE INDEX ix_localaccount_aggid ON edfi.LocalAccount (AggregateId); - -CREATE SEQUENCE edfi.localactual_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LocalActual ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localactual_aggseq'); -CREATE INDEX ix_localactual_aggid ON edfi.LocalActual (AggregateId); - -CREATE SEQUENCE edfi.localbudget_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LocalBudget ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localbudget_aggseq'); -CREATE INDEX ix_localbudget_aggid ON edfi.LocalBudget (AggregateId); - -CREATE SEQUENCE edfi.localcontractedstaff_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LocalContractedStaff ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localcontractedstaff_aggseq'); -CREATE INDEX ix_localcontractedstaff_aggid ON edfi.LocalContractedStaff (AggregateId); - -CREATE SEQUENCE edfi.localencumbrance_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LocalEncumbrance ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localencumbrance_aggseq'); -CREATE INDEX ix_localencumbrance_aggid ON edfi.LocalEncumbrance (AggregateId); - -CREATE SEQUENCE edfi.localpayroll_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.LocalPayroll ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localpayroll_aggseq'); -CREATE INDEX ix_localpayroll_aggid ON edfi.LocalPayroll (AggregateId); - -CREATE SEQUENCE edfi.location_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Location ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.location_aggseq'); -CREATE INDEX ix_location_aggid ON edfi.Location (AggregateId); - -CREATE SEQUENCE edfi.objectdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ObjectDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.objectdimension_aggseq'); -CREATE INDEX ix_objectdimension_aggid ON edfi.ObjectDimension (AggregateId); - -CREATE SEQUENCE edfi.objectiveassessment_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ObjectiveAssessment ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.objectiveassessment_aggseq'); -CREATE INDEX ix_objectiveassessment_aggid ON edfi.ObjectiveAssessment (AggregateId); - -CREATE SEQUENCE edfi.openstaffposition_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.OpenStaffPosition ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.openstaffposition_aggseq'); -CREATE INDEX ix_openstaffposition_aggid ON edfi.OpenStaffPosition (AggregateId); - -CREATE SEQUENCE edfi.operationalunitdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.OperationalUnitDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.operationalunitdimension_aggseq'); -CREATE INDEX ix_operationalunitdimension_aggid ON edfi.OperationalUnitDimension (AggregateId); - -CREATE SEQUENCE edfi.person_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Person ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.person_aggseq'); -CREATE INDEX ix_person_aggid ON edfi.Person (AggregateId); - -CREATE SEQUENCE edfi.postsecondaryevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.PostSecondaryEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.postsecondaryevent_aggseq'); -CREATE INDEX ix_postsecondaryevent_aggid ON edfi.PostSecondaryEvent (AggregateId); - -CREATE SEQUENCE edfi.program_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Program ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.program_aggseq'); -CREATE INDEX ix_program_aggid ON edfi.Program (AggregateId); - -CREATE SEQUENCE edfi.programdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ProgramDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programdimension_aggseq'); -CREATE INDEX ix_programdimension_aggid ON edfi.ProgramDimension (AggregateId); - -CREATE SEQUENCE edfi.programevaluation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ProgramEvaluation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programevaluation_aggseq'); -CREATE INDEX ix_programevaluation_aggid ON edfi.ProgramEvaluation (AggregateId); - -CREATE SEQUENCE edfi.programevaluationelement_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ProgramEvaluationElement ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programevaluationelement_aggseq'); -CREATE INDEX ix_programevaluationelement_aggid ON edfi.ProgramEvaluationElement (AggregateId); - -CREATE SEQUENCE edfi.programevaluationobjective_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ProgramEvaluationObjective ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programevaluationobjective_aggseq'); -CREATE INDEX ix_programevaluationobjective_aggid ON edfi.ProgramEvaluationObjective (AggregateId); - -CREATE SEQUENCE edfi.projectdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ProjectDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.projectdimension_aggseq'); -CREATE INDEX ix_projectdimension_aggid ON edfi.ProjectDimension (AggregateId); - -CREATE SEQUENCE edfi.reportcard_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.ReportCard ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.reportcard_aggseq'); -CREATE INDEX ix_reportcard_aggid ON edfi.ReportCard (AggregateId); - -CREATE SEQUENCE edfi.restraintevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.RestraintEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.restraintevent_aggseq'); -CREATE INDEX ix_restraintevent_aggid ON edfi.RestraintEvent (AggregateId); - -CREATE SEQUENCE edfi.schoolyeartype_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SchoolYearType ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.schoolyeartype_aggseq'); -CREATE INDEX ix_schoolyeartype_aggid ON edfi.SchoolYearType (AggregateId); - -CREATE SEQUENCE edfi.section_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Section ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.section_aggseq'); -CREATE INDEX ix_section_aggid ON edfi.Section (AggregateId); - -CREATE SEQUENCE edfi.sectionattendancetakenevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SectionAttendanceTakenEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.sectionattendancetakenevent_aggseq'); -CREATE INDEX ix_sectionattendancetakenevent_aggid ON edfi.SectionAttendanceTakenEvent (AggregateId); - -CREATE SEQUENCE edfi.session_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Session ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.session_aggseq'); -CREATE INDEX ix_session_aggid ON edfi.Session (AggregateId); - -CREATE SEQUENCE edfi.sourcedimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SourceDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.sourcedimension_aggseq'); -CREATE INDEX ix_sourcedimension_aggid ON edfi.SourceDimension (AggregateId); - -CREATE SEQUENCE edfi.staff_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Staff ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staff_aggseq'); -CREATE INDEX ix_staff_aggid ON edfi.Staff (AggregateId); - -CREATE SEQUENCE edfi.staffabsenceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffAbsenceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffabsenceevent_aggseq'); -CREATE INDEX ix_staffabsenceevent_aggid ON edfi.StaffAbsenceEvent (AggregateId); - -CREATE SEQUENCE edfi.staffcohortassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffCohortAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffcohortassociation_aggseq'); -CREATE INDEX ix_staffcohortassociation_aggid ON edfi.StaffCohortAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffdisciplineincidentassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffDisciplineIncidentAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffdisciplineincidentassociation_aggseq'); -CREATE INDEX ix_staffdisciplineincidentassociation_aggid ON edfi.StaffDisciplineIncidentAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffeducationorganizationassignmentassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffEducationOrganizationAssignmentAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffeducationorganizationassignmentassociation_aggseq'); -CREATE INDEX ix_staffeducationorganizationassignmentassociation_aggid ON edfi.StaffEducationOrganizationAssignmentAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffeducationorganizationcontactassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffEducationOrganizationContactAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffeducationorganizationcontactassociation_aggseq'); -CREATE INDEX ix_staffeducationorganizationcontactassociation_aggid ON edfi.StaffEducationOrganizationContactAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffeducationorganizationemploymentassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffEducationOrganizationEmploymentAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffeducationorganizationemploymentassociation_aggseq'); -CREATE INDEX ix_staffeducationorganizationemploymentassociation_aggid ON edfi.StaffEducationOrganizationEmploymentAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffleave_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffLeave ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffleave_aggseq'); -CREATE INDEX ix_staffleave_aggid ON edfi.StaffLeave (AggregateId); - -CREATE SEQUENCE edfi.staffprogramassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffProgramAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffprogramassociation_aggseq'); -CREATE INDEX ix_staffprogramassociation_aggid ON edfi.StaffProgramAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffschoolassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffSchoolAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffschoolassociation_aggseq'); -CREATE INDEX ix_staffschoolassociation_aggid ON edfi.StaffSchoolAssociation (AggregateId); - -CREATE SEQUENCE edfi.staffsectionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StaffSectionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffsectionassociation_aggseq'); -CREATE INDEX ix_staffsectionassociation_aggid ON edfi.StaffSectionAssociation (AggregateId); - -CREATE SEQUENCE edfi.student_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Student ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.student_aggseq'); -CREATE INDEX ix_student_aggid ON edfi.Student (AggregateId); - -CREATE SEQUENCE edfi.studentacademicrecord_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentAcademicRecord ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentacademicrecord_aggseq'); -CREATE INDEX ix_studentacademicrecord_aggid ON edfi.StudentAcademicRecord (AggregateId); - -CREATE SEQUENCE edfi.studentassessment_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentAssessment ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentassessment_aggseq'); -CREATE INDEX ix_studentassessment_aggid ON edfi.StudentAssessment (AggregateId); - -CREATE SEQUENCE edfi.studentassessmenteducationorganizationassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentAssessmentEducationOrganizationAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentassessmenteducationorganizationassociation_aggseq'); -CREATE INDEX ix_studentassessmenteducationorganizationassociation_aggid ON edfi.StudentAssessmentEducationOrganizationAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentcohortassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentCohortAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentcohortassociation_aggseq'); -CREATE INDEX ix_studentcohortassociation_aggid ON edfi.StudentCohortAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentcompetencyobjective_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentCompetencyObjective ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentcompetencyobjective_aggseq'); -CREATE INDEX ix_studentcompetencyobjective_aggid ON edfi.StudentCompetencyObjective (AggregateId); - -CREATE SEQUENCE edfi.studentcontactassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentContactAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentcontactassociation_aggseq'); -CREATE INDEX ix_studentcontactassociation_aggid ON edfi.StudentContactAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentdisciplineincidentbehaviorassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentDisciplineIncidentBehaviorAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentdisciplineincidentbehaviorassociation_aggseq'); -CREATE INDEX ix_studentdisciplineincidentbehaviorassociation_aggid ON edfi.StudentDisciplineIncidentBehaviorAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentdisciplineincidentnonoffenderassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentDisciplineIncidentNonOffenderAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentdisciplineincidentnonoffenderassociation_aggseq'); -CREATE INDEX ix_studentdisciplineincidentnonoffenderassociation_aggid ON edfi.StudentDisciplineIncidentNonOffenderAssociation (AggregateId); - -CREATE SEQUENCE edfi.studenteducationorganizationassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentEducationOrganizationAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenteducationorganizationassociation_aggseq'); -CREATE INDEX ix_studenteducationorganizationassociation_aggid ON edfi.StudentEducationOrganizationAssociation (AggregateId); - -CREATE SEQUENCE edfi.studenteducationorganizationresponsibilityassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentEducationOrganizationResponsibilityAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenteducationorganizationresponsibilityassociation_aggseq'); -CREATE INDEX ix_studenteducationorganizationresponsibilityassociation_aggid ON edfi.StudentEducationOrganizationResponsibilityAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentgradebookentry_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentGradebookEntry ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentgradebookentry_aggseq'); -CREATE INDEX ix_studentgradebookentry_aggid ON edfi.StudentGradebookEntry (AggregateId); - -CREATE SEQUENCE edfi.studenthealth_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentHealth ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenthealth_aggseq'); -CREATE INDEX ix_studenthealth_aggid ON edfi.StudentHealth (AggregateId); - -CREATE SEQUENCE edfi.studentinterventionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentInterventionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentinterventionassociation_aggseq'); -CREATE INDEX ix_studentinterventionassociation_aggid ON edfi.StudentInterventionAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentinterventionattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentInterventionAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentinterventionattendanceevent_aggseq'); -CREATE INDEX ix_studentinterventionattendanceevent_aggid ON edfi.StudentInterventionAttendanceEvent (AggregateId); - -CREATE SEQUENCE edfi.studentprogramattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentProgramAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentprogramattendanceevent_aggseq'); -CREATE INDEX ix_studentprogramattendanceevent_aggid ON edfi.StudentProgramAttendanceEvent (AggregateId); - -CREATE SEQUENCE edfi.studentprogramevaluation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentProgramEvaluation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentprogramevaluation_aggseq'); -CREATE INDEX ix_studentprogramevaluation_aggid ON edfi.StudentProgramEvaluation (AggregateId); - -CREATE SEQUENCE edfi.studentschoolassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentSchoolAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentschoolassociation_aggseq'); -CREATE INDEX ix_studentschoolassociation_aggid ON edfi.StudentSchoolAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentschoolattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentSchoolAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentschoolattendanceevent_aggseq'); -CREATE INDEX ix_studentschoolattendanceevent_aggid ON edfi.StudentSchoolAttendanceEvent (AggregateId); - -CREATE SEQUENCE edfi.studentsectionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentSectionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentsectionassociation_aggseq'); -CREATE INDEX ix_studentsectionassociation_aggid ON edfi.StudentSectionAssociation (AggregateId); - -CREATE SEQUENCE edfi.studentsectionattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentSectionAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentsectionattendanceevent_aggseq'); -CREATE INDEX ix_studentsectionattendanceevent_aggid ON edfi.StudentSectionAttendanceEvent (AggregateId); - -CREATE SEQUENCE edfi.studentspecialeducationprogrameligibilityassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentSpecialEducationProgramEligibilityAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentspecialeducationprogrameligibilityassociation_aggseq'); -CREATE INDEX ix_studentspecialeducationprogrameligibilityassociation_aggid ON edfi.StudentSpecialEducationProgramEligibilityAssociation (AggregateId); - -CREATE SEQUENCE edfi.studenttransportation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.StudentTransportation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenttransportation_aggseq'); -CREATE INDEX ix_studenttransportation_aggid ON edfi.StudentTransportation (AggregateId); - -CREATE SEQUENCE edfi.survey_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.Survey ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.survey_aggseq'); -CREATE INDEX ix_survey_aggid ON edfi.Survey (AggregateId); - -CREATE SEQUENCE edfi.surveycourseassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyCourseAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveycourseassociation_aggseq'); -CREATE INDEX ix_surveycourseassociation_aggid ON edfi.SurveyCourseAssociation (AggregateId); - -CREATE SEQUENCE edfi.surveyprogramassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyProgramAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyprogramassociation_aggseq'); -CREATE INDEX ix_surveyprogramassociation_aggid ON edfi.SurveyProgramAssociation (AggregateId); - -CREATE SEQUENCE edfi.surveyquestion_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyQuestion ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyquestion_aggseq'); -CREATE INDEX ix_surveyquestion_aggid ON edfi.SurveyQuestion (AggregateId); - -CREATE SEQUENCE edfi.surveyquestionresponse_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyQuestionResponse ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyquestionresponse_aggseq'); -CREATE INDEX ix_surveyquestionresponse_aggid ON edfi.SurveyQuestionResponse (AggregateId); - -CREATE SEQUENCE edfi.surveyresponse_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyResponse ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyresponse_aggseq'); -CREATE INDEX ix_surveyresponse_aggid ON edfi.SurveyResponse (AggregateId); - -CREATE SEQUENCE edfi.surveyresponseeducationorganizationtargetassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyResponseEducationOrganizationTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyresponseeducationorganizationtargetassociation_aggseq'); -CREATE INDEX ix_surveyresponseeducationorganizationtargetassociation_aggid ON edfi.SurveyResponseEducationOrganizationTargetAssociation (AggregateId); - -CREATE SEQUENCE edfi.surveyresponsestafftargetassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveyResponseStaffTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyresponsestafftargetassociation_aggseq'); -CREATE INDEX ix_surveyresponsestafftargetassociation_aggid ON edfi.SurveyResponseStaffTargetAssociation (AggregateId); - -CREATE SEQUENCE edfi.surveysection_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveySection ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysection_aggseq'); -CREATE INDEX ix_surveysection_aggid ON edfi.SurveySection (AggregateId); - -CREATE SEQUENCE edfi.surveysectionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveySectionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionassociation_aggseq'); -CREATE INDEX ix_surveysectionassociation_aggid ON edfi.SurveySectionAssociation (AggregateId); - -CREATE SEQUENCE edfi.surveysectionresponse_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveySectionResponse ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionresponse_aggseq'); -CREATE INDEX ix_surveysectionresponse_aggid ON edfi.SurveySectionResponse (AggregateId); - -CREATE SEQUENCE edfi.surveysectionresponseedorgtargetassoc_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveySectionResponseEducationOrganizationTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionresponseedorgtargetassoc_aggseq'); -CREATE INDEX ix_surveysectionresponseedorgtargetassoc_aggid ON edfi.SurveySectionResponseEducationOrganizationTargetAssociation (AggregateId); - -CREATE SEQUENCE edfi.surveysectionresponsestafftargetassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; -ALTER TABLE edfi.SurveySectionResponseStaffTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionresponsestafftargetassociation_aggseq'); -CREATE INDEX ix_surveysectionresponsestafftargetassociation_aggid ON edfi.SurveySectionResponseStaffTargetAssociation (AggregateId); From a403faac464a91306a16695bc94ce7da650d3c2d Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Thu, 26 Sep 2024 10:50:18 -0500 Subject: [PATCH 2/6] ODS-6432 - Added Scripts --- .../Ods/1470-Add-AggregateId-columns.sql | 477 +++++++++++++++++ .../Ods/1470-Add-AggregateId-columns.sql | 479 ++++++++++++++++++ 2 files changed, 956 insertions(+) create mode 100644 Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql create mode 100644 Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql diff --git a/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql new file mode 100644 index 000000000..0cad76479 --- /dev/null +++ b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1470-Add-AggregateId-columns.sql @@ -0,0 +1,477 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Licensed to the Ed-Fi Alliance under one or more agreements. +-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. +-- See the LICENSE and NOTICES files in the project root for more information. + +/* Generated with SSMS using: +------------------------------------------------ + SELECT 'CREATE SEQUENCE [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '_AggSeq] START WITH -2147483648 INCREMENT BY 1; ALTER TABLE [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '_AggSeq]; CREATE INDEX [IX_' + c.TABLE_NAME + '_AggregateId] ON [' + c.TABLE_SCHEMA + '].[' + c.TABLE_NAME + '] (AggregateId);' AS SqlServer + FROM INFORMATION_SCHEMA.COLUMNS c + WHERE c.COLUMN_NAME = 'Id' and c.TABLE_SCHEMA = @schema + ORDER BY c.TABLE_SCHEMA, c.TABLE_NAME +------------------------------------------------ +*/ + +CREATE SEQUENCE [edfi].[AcademicWeek_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[AcademicWeek] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AcademicWeek_AggSeq]; +CREATE INDEX [IX_AcademicWeek_AggregateId] ON [edfi].[AcademicWeek] (AggregateId); + +CREATE SEQUENCE [edfi].[AccountabilityRating_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[AccountabilityRating] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[AccountabilityRating_AggSeq]; +CREATE INDEX [IX_AccountabilityRating_AggregateId] ON [edfi].[AccountabilityRating] (AggregateId); + +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].[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); + +CREATE SEQUENCE [edfi].[AssessmentScoreRangeLearningStandard_AggSeq] START WITH -2147483648 INCREMENT BY 1; +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].[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); + +CREATE SEQUENCE [edfi].[BellSchedule_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[BellSchedule] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[BellSchedule_AggSeq]; +CREATE INDEX [IX_BellSchedule_AggregateId] ON [edfi].[BellSchedule] (AggregateId); + +CREATE SEQUENCE [edfi].[Calendar_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Calendar] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Calendar_AggSeq]; +CREATE INDEX [IX_Calendar_AggregateId] ON [edfi].[Calendar] (AggregateId); + +CREATE SEQUENCE [edfi].[CalendarDate_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[CalendarDate] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CalendarDate_AggSeq]; +CREATE INDEX [IX_CalendarDate_AggregateId] ON [edfi].[CalendarDate] (AggregateId); + +CREATE SEQUENCE [edfi].[ChartOfAccount_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ChartOfAccount] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ChartOfAccount_AggSeq]; +CREATE INDEX [IX_ChartOfAccount_AggregateId] ON [edfi].[ChartOfAccount] (AggregateId); + +CREATE SEQUENCE [edfi].[ClassPeriod_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ClassPeriod] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ClassPeriod_AggSeq]; +CREATE INDEX [IX_ClassPeriod_AggregateId] ON [edfi].[ClassPeriod] (AggregateId); + +CREATE SEQUENCE [edfi].[Cohort_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Cohort] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Cohort_AggSeq]; +CREATE INDEX [IX_Cohort_AggregateId] ON [edfi].[Cohort] (AggregateId); + +CREATE SEQUENCE [edfi].[CommunityProviderLicense_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[CommunityProviderLicense] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CommunityProviderLicense_AggSeq]; +CREATE INDEX [IX_CommunityProviderLicense_AggregateId] ON [edfi].[CommunityProviderLicense] (AggregateId); + +CREATE SEQUENCE [edfi].[CompetencyObjective_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[CompetencyObjective] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CompetencyObjective_AggSeq]; +CREATE INDEX [IX_CompetencyObjective_AggregateId] ON [edfi].[CompetencyObjective] (AggregateId); + +CREATE SEQUENCE [edfi].[Contact_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Contact] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Contact_AggSeq]; +CREATE INDEX [IX_Contact_AggregateId] ON [edfi].[Contact] (AggregateId); + +CREATE SEQUENCE [edfi].[Course_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Course] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Course_AggSeq]; +CREATE INDEX [IX_Course_AggregateId] ON [edfi].[Course] (AggregateId); + +CREATE SEQUENCE [edfi].[CourseOffering_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[CourseOffering] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CourseOffering_AggSeq]; +CREATE INDEX [IX_CourseOffering_AggregateId] ON [edfi].[CourseOffering] (AggregateId); + +CREATE SEQUENCE [edfi].[CourseTranscript_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[CourseTranscript] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CourseTranscript_AggSeq]; +CREATE INDEX [IX_CourseTranscript_AggregateId] ON [edfi].[CourseTranscript] (AggregateId); + +CREATE SEQUENCE [edfi].[Credential_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Credential] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Credential_AggSeq]; +CREATE INDEX [IX_Credential_AggregateId] ON [edfi].[Credential] (AggregateId); + +CREATE SEQUENCE [edfi].[CrisisEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[CrisisEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[CrisisEvent_AggSeq]; +CREATE INDEX [IX_CrisisEvent_AggregateId] ON [edfi].[CrisisEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[Descriptor_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Descriptor] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Descriptor_AggSeq]; +CREATE INDEX [IX_Descriptor_AggregateId] ON [edfi].[Descriptor] (AggregateId); + +CREATE SEQUENCE [edfi].[DescriptorMapping_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[DescriptorMapping] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[DescriptorMapping_AggSeq]; +CREATE INDEX [IX_DescriptorMapping_AggregateId] ON [edfi].[DescriptorMapping] (AggregateId); + +CREATE SEQUENCE [edfi].[DisciplineAction_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[DisciplineAction] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[DisciplineAction_AggSeq]; +CREATE INDEX [IX_DisciplineAction_AggregateId] ON [edfi].[DisciplineAction] (AggregateId); + +CREATE SEQUENCE [edfi].[DisciplineIncident_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[DisciplineIncident] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[DisciplineIncident_AggSeq]; +CREATE INDEX [IX_DisciplineIncident_AggregateId] ON [edfi].[DisciplineIncident] (AggregateId); + +CREATE SEQUENCE [edfi].[EducationContent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[EducationContent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationContent_AggSeq]; +CREATE INDEX [IX_EducationContent_AggregateId] ON [edfi].[EducationContent] (AggregateId); + +CREATE SEQUENCE [edfi].[EducationOrganization_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[EducationOrganization] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganization_AggSeq]; +CREATE INDEX [IX_EducationOrganization_AggregateId] ON [edfi].[EducationOrganization] (AggregateId); + +CREATE SEQUENCE [edfi].[EducationOrganizationInterventionPrescriptionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[EducationOrganizationInterventionPrescriptionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganizationInterventionPrescriptionAssociation_AggSeq]; +CREATE INDEX [IX_EducationOrganizationInterventionPrescriptionAssociation_AggregateId] ON [edfi].[EducationOrganizationInterventionPrescriptionAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[EducationOrganizationNetworkAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[EducationOrganizationNetworkAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganizationNetworkAssociation_AggSeq]; +CREATE INDEX [IX_EducationOrganizationNetworkAssociation_AggregateId] ON [edfi].[EducationOrganizationNetworkAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[EducationOrganizationPeerAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[EducationOrganizationPeerAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EducationOrganizationPeerAssociation_AggSeq]; +CREATE INDEX [IX_EducationOrganizationPeerAssociation_AggregateId] ON [edfi].[EducationOrganizationPeerAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[EvaluationRubricDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[EvaluationRubricDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[EvaluationRubricDimension_AggSeq]; +CREATE INDEX [IX_EvaluationRubricDimension_AggregateId] ON [edfi].[EvaluationRubricDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[FeederSchoolAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[FeederSchoolAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[FeederSchoolAssociation_AggSeq]; +CREATE INDEX [IX_FeederSchoolAssociation_AggregateId] ON [edfi].[FeederSchoolAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[FunctionDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[FunctionDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[FunctionDimension_AggSeq]; +CREATE INDEX [IX_FunctionDimension_AggregateId] ON [edfi].[FunctionDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[FundDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[FundDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[FundDimension_AggSeq]; +CREATE INDEX [IX_FundDimension_AggregateId] ON [edfi].[FundDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[GeneralStudentProgramAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[GeneralStudentProgramAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GeneralStudentProgramAssociation_AggSeq]; +CREATE INDEX [IX_GeneralStudentProgramAssociation_AggregateId] ON [edfi].[GeneralStudentProgramAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[Grade_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Grade] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Grade_AggSeq]; +CREATE INDEX [IX_Grade_AggregateId] ON [edfi].[Grade] (AggregateId); + +CREATE SEQUENCE [edfi].[GradebookEntry_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[GradebookEntry] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GradebookEntry_AggSeq]; +CREATE INDEX [IX_GradebookEntry_AggregateId] ON [edfi].[GradebookEntry] (AggregateId); + +CREATE SEQUENCE [edfi].[GradingPeriod_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[GradingPeriod] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GradingPeriod_AggSeq]; +CREATE INDEX [IX_GradingPeriod_AggregateId] ON [edfi].[GradingPeriod] (AggregateId); + +CREATE SEQUENCE [edfi].[GraduationPlan_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[GraduationPlan] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[GraduationPlan_AggSeq]; +CREATE INDEX [IX_GraduationPlan_AggregateId] ON [edfi].[GraduationPlan] (AggregateId); + +CREATE SEQUENCE [edfi].[Intervention_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Intervention] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Intervention_AggSeq]; +CREATE INDEX [IX_Intervention_AggregateId] ON [edfi].[Intervention] (AggregateId); + +CREATE SEQUENCE [edfi].[InterventionPrescription_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[InterventionPrescription] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[InterventionPrescription_AggSeq]; +CREATE INDEX [IX_InterventionPrescription_AggregateId] ON [edfi].[InterventionPrescription] (AggregateId); + +CREATE SEQUENCE [edfi].[InterventionStudy_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[InterventionStudy] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[InterventionStudy_AggSeq]; +CREATE INDEX [IX_InterventionStudy_AggregateId] ON [edfi].[InterventionStudy] (AggregateId); + +CREATE SEQUENCE [edfi].[LearningStandard_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LearningStandard] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LearningStandard_AggSeq]; +CREATE INDEX [IX_LearningStandard_AggregateId] ON [edfi].[LearningStandard] (AggregateId); + +CREATE SEQUENCE [edfi].[LearningStandardEquivalenceAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LearningStandardEquivalenceAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LearningStandardEquivalenceAssociation_AggSeq]; +CREATE INDEX [IX_LearningStandardEquivalenceAssociation_AggregateId] ON [edfi].[LearningStandardEquivalenceAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[LocalAccount_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LocalAccount] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalAccount_AggSeq]; +CREATE INDEX [IX_LocalAccount_AggregateId] ON [edfi].[LocalAccount] (AggregateId); + +CREATE SEQUENCE [edfi].[LocalActual_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LocalActual] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalActual_AggSeq]; +CREATE INDEX [IX_LocalActual_AggregateId] ON [edfi].[LocalActual] (AggregateId); + +CREATE SEQUENCE [edfi].[LocalBudget_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LocalBudget] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalBudget_AggSeq]; +CREATE INDEX [IX_LocalBudget_AggregateId] ON [edfi].[LocalBudget] (AggregateId); + +CREATE SEQUENCE [edfi].[LocalContractedStaff_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LocalContractedStaff] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalContractedStaff_AggSeq]; +CREATE INDEX [IX_LocalContractedStaff_AggregateId] ON [edfi].[LocalContractedStaff] (AggregateId); + +CREATE SEQUENCE [edfi].[LocalEncumbrance_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LocalEncumbrance] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalEncumbrance_AggSeq]; +CREATE INDEX [IX_LocalEncumbrance_AggregateId] ON [edfi].[LocalEncumbrance] (AggregateId); + +CREATE SEQUENCE [edfi].[LocalPayroll_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[LocalPayroll] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[LocalPayroll_AggSeq]; +CREATE INDEX [IX_LocalPayroll_AggregateId] ON [edfi].[LocalPayroll] (AggregateId); + +CREATE SEQUENCE [edfi].[Location_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Location] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Location_AggSeq]; +CREATE INDEX [IX_Location_AggregateId] ON [edfi].[Location] (AggregateId); + +CREATE SEQUENCE [edfi].[ObjectDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ObjectDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ObjectDimension_AggSeq]; +CREATE INDEX [IX_ObjectDimension_AggregateId] ON [edfi].[ObjectDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[ObjectiveAssessment_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ObjectiveAssessment] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ObjectiveAssessment_AggSeq]; +CREATE INDEX [IX_ObjectiveAssessment_AggregateId] ON [edfi].[ObjectiveAssessment] (AggregateId); + +CREATE SEQUENCE [edfi].[OpenStaffPosition_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[OpenStaffPosition] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[OpenStaffPosition_AggSeq]; +CREATE INDEX [IX_OpenStaffPosition_AggregateId] ON [edfi].[OpenStaffPosition] (AggregateId); + +CREATE SEQUENCE [edfi].[OperationalUnitDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[OperationalUnitDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[OperationalUnitDimension_AggSeq]; +CREATE INDEX [IX_OperationalUnitDimension_AggregateId] ON [edfi].[OperationalUnitDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[Person_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Person] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Person_AggSeq]; +CREATE INDEX [IX_Person_AggregateId] ON [edfi].[Person] (AggregateId); + +CREATE SEQUENCE [edfi].[PostSecondaryEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[PostSecondaryEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[PostSecondaryEvent_AggSeq]; +CREATE INDEX [IX_PostSecondaryEvent_AggregateId] ON [edfi].[PostSecondaryEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[Program_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Program] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Program_AggSeq]; +CREATE INDEX [IX_Program_AggregateId] ON [edfi].[Program] (AggregateId); + +CREATE SEQUENCE [edfi].[ProgramDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ProgramDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramDimension_AggSeq]; +CREATE INDEX [IX_ProgramDimension_AggregateId] ON [edfi].[ProgramDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[ProgramEvaluation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ProgramEvaluation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramEvaluation_AggSeq]; +CREATE INDEX [IX_ProgramEvaluation_AggregateId] ON [edfi].[ProgramEvaluation] (AggregateId); + +CREATE SEQUENCE [edfi].[ProgramEvaluationElement_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ProgramEvaluationElement] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramEvaluationElement_AggSeq]; +CREATE INDEX [IX_ProgramEvaluationElement_AggregateId] ON [edfi].[ProgramEvaluationElement] (AggregateId); + +CREATE SEQUENCE [edfi].[ProgramEvaluationObjective_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ProgramEvaluationObjective] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProgramEvaluationObjective_AggSeq]; +CREATE INDEX [IX_ProgramEvaluationObjective_AggregateId] ON [edfi].[ProgramEvaluationObjective] (AggregateId); + +CREATE SEQUENCE [edfi].[ProjectDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ProjectDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ProjectDimension_AggSeq]; +CREATE INDEX [IX_ProjectDimension_AggregateId] ON [edfi].[ProjectDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[ReportCard_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[ReportCard] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[ReportCard_AggSeq]; +CREATE INDEX [IX_ReportCard_AggregateId] ON [edfi].[ReportCard] (AggregateId); + +CREATE SEQUENCE [edfi].[RestraintEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[RestraintEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[RestraintEvent_AggSeq]; +CREATE INDEX [IX_RestraintEvent_AggregateId] ON [edfi].[RestraintEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[SchoolYearType_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SchoolYearType] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SchoolYearType_AggSeq]; +CREATE INDEX [IX_SchoolYearType_AggregateId] ON [edfi].[SchoolYearType] (AggregateId); + +CREATE SEQUENCE [edfi].[Section_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Section] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Section_AggSeq]; +CREATE INDEX [IX_Section_AggregateId] ON [edfi].[Section] (AggregateId); + +CREATE SEQUENCE [edfi].[SectionAttendanceTakenEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SectionAttendanceTakenEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SectionAttendanceTakenEvent_AggSeq]; +CREATE INDEX [IX_SectionAttendanceTakenEvent_AggregateId] ON [edfi].[SectionAttendanceTakenEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[Session_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Session] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Session_AggSeq]; +CREATE INDEX [IX_Session_AggregateId] ON [edfi].[Session] (AggregateId); + +CREATE SEQUENCE [edfi].[SourceDimension_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SourceDimension] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SourceDimension_AggSeq]; +CREATE INDEX [IX_SourceDimension_AggregateId] ON [edfi].[SourceDimension] (AggregateId); + +CREATE SEQUENCE [edfi].[Staff_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Staff] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Staff_AggSeq]; +CREATE INDEX [IX_Staff_AggregateId] ON [edfi].[Staff] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffAbsenceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffAbsenceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffAbsenceEvent_AggSeq]; +CREATE INDEX [IX_StaffAbsenceEvent_AggregateId] ON [edfi].[StaffAbsenceEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffCohortAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffCohortAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffCohortAssociation_AggSeq]; +CREATE INDEX [IX_StaffCohortAssociation_AggregateId] ON [edfi].[StaffCohortAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffDisciplineIncidentAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffDisciplineIncidentAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffDisciplineIncidentAssociation_AggSeq]; +CREATE INDEX [IX_StaffDisciplineIncidentAssociation_AggregateId] ON [edfi].[StaffDisciplineIncidentAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffEducationOrganizationAssignmentAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffEducationOrganizationAssignmentAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffEducationOrganizationAssignmentAssociation_AggSeq]; +CREATE INDEX [IX_StaffEducationOrganizationAssignmentAssociation_AggregateId] ON [edfi].[StaffEducationOrganizationAssignmentAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffEducationOrganizationContactAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffEducationOrganizationContactAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffEducationOrganizationContactAssociation_AggSeq]; +CREATE INDEX [IX_StaffEducationOrganizationContactAssociation_AggregateId] ON [edfi].[StaffEducationOrganizationContactAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffEducationOrganizationEmploymentAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffEducationOrganizationEmploymentAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffEducationOrganizationEmploymentAssociation_AggSeq]; +CREATE INDEX [IX_StaffEducationOrganizationEmploymentAssociation_AggregateId] ON [edfi].[StaffEducationOrganizationEmploymentAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffLeave_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffLeave] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffLeave_AggSeq]; +CREATE INDEX [IX_StaffLeave_AggregateId] ON [edfi].[StaffLeave] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffProgramAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffProgramAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffProgramAssociation_AggSeq]; +CREATE INDEX [IX_StaffProgramAssociation_AggregateId] ON [edfi].[StaffProgramAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffSchoolAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffSchoolAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffSchoolAssociation_AggSeq]; +CREATE INDEX [IX_StaffSchoolAssociation_AggregateId] ON [edfi].[StaffSchoolAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StaffSectionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StaffSectionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StaffSectionAssociation_AggSeq]; +CREATE INDEX [IX_StaffSectionAssociation_AggregateId] ON [edfi].[StaffSectionAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[Student_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Student] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Student_AggSeq]; +CREATE INDEX [IX_Student_AggregateId] ON [edfi].[Student] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentAcademicRecord_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentAcademicRecord] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAcademicRecord_AggSeq]; +CREATE INDEX [IX_StudentAcademicRecord_AggregateId] ON [edfi].[StudentAcademicRecord] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentAssessment_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentAssessment] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentAssessment_AggSeq]; +CREATE INDEX [IX_StudentAssessment_AggregateId] ON [edfi].[StudentAssessment] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentAssessmentEducationOrganizationAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +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].[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); + +CREATE SEQUENCE [edfi].[StudentCompetencyObjective_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentCompetencyObjective] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentCompetencyObjective_AggSeq]; +CREATE INDEX [IX_StudentCompetencyObjective_AggregateId] ON [edfi].[StudentCompetencyObjective] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentContactAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentContactAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentContactAssociation_AggSeq]; +CREATE INDEX [IX_StudentContactAssociation_AggregateId] ON [edfi].[StudentContactAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentDisciplineIncidentBehaviorAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentDisciplineIncidentBehaviorAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentDisciplineIncidentBehaviorAssociation_AggSeq]; +CREATE INDEX [IX_StudentDisciplineIncidentBehaviorAssociation_AggregateId] ON [edfi].[StudentDisciplineIncidentBehaviorAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentDisciplineIncidentNonOffenderAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +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].[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); + +CREATE SEQUENCE [edfi].[StudentEducationOrganizationResponsibilityAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentEducationOrganizationResponsibilityAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentEducationOrganizationResponsibilityAssociation_AggSeq]; +CREATE INDEX [IX_StudentEducationOrganizationResponsibilityAssociation_AggregateId] ON [edfi].[StudentEducationOrganizationResponsibilityAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentGradebookEntry_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentGradebookEntry] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentGradebookEntry_AggSeq]; +CREATE INDEX [IX_StudentGradebookEntry_AggregateId] ON [edfi].[StudentGradebookEntry] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentHealth_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentHealth] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentHealth_AggSeq]; +CREATE INDEX [IX_StudentHealth_AggregateId] ON [edfi].[StudentHealth] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentInterventionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentInterventionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentInterventionAssociation_AggSeq]; +CREATE INDEX [IX_StudentInterventionAssociation_AggregateId] ON [edfi].[StudentInterventionAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentInterventionAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentInterventionAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentInterventionAttendanceEvent_AggSeq]; +CREATE INDEX [IX_StudentInterventionAttendanceEvent_AggregateId] ON [edfi].[StudentInterventionAttendanceEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentProgramAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentProgramAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentProgramAttendanceEvent_AggSeq]; +CREATE INDEX [IX_StudentProgramAttendanceEvent_AggregateId] ON [edfi].[StudentProgramAttendanceEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentProgramEvaluation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentProgramEvaluation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentProgramEvaluation_AggSeq]; +CREATE INDEX [IX_StudentProgramEvaluation_AggregateId] ON [edfi].[StudentProgramEvaluation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentSchoolAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentSchoolAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSchoolAssociation_AggSeq]; +CREATE INDEX [IX_StudentSchoolAssociation_AggregateId] ON [edfi].[StudentSchoolAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentSchoolAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentSchoolAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSchoolAttendanceEvent_AggSeq]; +CREATE INDEX [IX_StudentSchoolAttendanceEvent_AggregateId] ON [edfi].[StudentSchoolAttendanceEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentSectionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentSectionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSectionAssociation_AggSeq]; +CREATE INDEX [IX_StudentSectionAssociation_AggregateId] ON [edfi].[StudentSectionAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentSectionAttendanceEvent_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentSectionAttendanceEvent] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSectionAttendanceEvent_AggSeq]; +CREATE INDEX [IX_StudentSectionAttendanceEvent_AggregateId] ON [edfi].[StudentSectionAttendanceEvent] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentSpecialEducationProgramEligibilityAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentSpecialEducationProgramEligibilityAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentSpecialEducationProgramEligibilityAssociation_AggSeq]; +CREATE INDEX [IX_StudentSpecialEducationProgramEligibilityAssociation_AggregateId] ON [edfi].[StudentSpecialEducationProgramEligibilityAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[StudentTransportation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[StudentTransportation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[StudentTransportation_AggSeq]; +CREATE INDEX [IX_StudentTransportation_AggregateId] ON [edfi].[StudentTransportation] (AggregateId); + +CREATE SEQUENCE [edfi].[Survey_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[Survey] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[Survey_AggSeq]; +CREATE INDEX [IX_Survey_AggregateId] ON [edfi].[Survey] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyCourseAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyCourseAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyCourseAssociation_AggSeq]; +CREATE INDEX [IX_SurveyCourseAssociation_AggregateId] ON [edfi].[SurveyCourseAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyProgramAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyProgramAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyProgramAssociation_AggSeq]; +CREATE INDEX [IX_SurveyProgramAssociation_AggregateId] ON [edfi].[SurveyProgramAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyQuestion_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyQuestion] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyQuestion_AggSeq]; +CREATE INDEX [IX_SurveyQuestion_AggregateId] ON [edfi].[SurveyQuestion] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyQuestionResponse_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyQuestionResponse] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyQuestionResponse_AggSeq]; +CREATE INDEX [IX_SurveyQuestionResponse_AggregateId] ON [edfi].[SurveyQuestionResponse] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyResponse_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyResponse] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyResponse_AggSeq]; +CREATE INDEX [IX_SurveyResponse_AggregateId] ON [edfi].[SurveyResponse] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyResponseEducationOrganizationTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyResponseEducationOrganizationTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyResponseEducationOrganizationTargetAssociation_AggSeq]; +CREATE INDEX [IX_SurveyResponseEducationOrganizationTargetAssociation_AggregateId] ON [edfi].[SurveyResponseEducationOrganizationTargetAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveyResponseStaffTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveyResponseStaffTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveyResponseStaffTargetAssociation_AggSeq]; +CREATE INDEX [IX_SurveyResponseStaffTargetAssociation_AggregateId] ON [edfi].[SurveyResponseStaffTargetAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveySection_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveySection] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySection_AggSeq]; +CREATE INDEX [IX_SurveySection_AggregateId] ON [edfi].[SurveySection] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveySectionAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveySectionAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionAssociation_AggSeq]; +CREATE INDEX [IX_SurveySectionAssociation_AggregateId] ON [edfi].[SurveySectionAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveySectionResponse_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveySectionResponse] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionResponse_AggSeq]; +CREATE INDEX [IX_SurveySectionResponse_AggregateId] ON [edfi].[SurveySectionResponse] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation_AggSeq]; +CREATE INDEX [IX_SurveySectionResponseEducationOrganizationTargetAssociation_AggregateId] ON [edfi].[SurveySectionResponseEducationOrganizationTargetAssociation] (AggregateId); + +CREATE SEQUENCE [edfi].[SurveySectionResponseStaffTargetAssociation_AggSeq] START WITH -2147483648 INCREMENT BY 1; +ALTER TABLE [edfi].[SurveySectionResponseStaffTargetAssociation] ADD AggregateId int NOT NULL DEFAULT NEXT VALUE FOR [edfi].[SurveySectionResponseStaffTargetAssociation_AggSeq]; +CREATE INDEX [IX_SurveySectionResponseStaffTargetAssociation_AggregateId] ON [edfi].[SurveySectionResponseStaffTargetAssociation] (AggregateId); diff --git a/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql new file mode 100644 index 000000000..2210a4436 --- /dev/null +++ b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1470-Add-AggregateId-columns.sql @@ -0,0 +1,479 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Licensed to the Ed-Fi Alliance under one or more agreements. +-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. +-- See the LICENSE and NOTICES files in the project root for more information. + +/* Generated with SSMS using: +------------------------------------------------ + SELECT 'CREATE SEQUENCE ' + LOWER(c.TABLE_SCHEMA) + '.' + LOWER(c.TABLE_NAME) + '_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; + ALTER TABLE ' + c.TABLE_SCHEMA + '.' + c.TABLE_NAME + ' ADD COLUMN AggregateId int NOT NULL DEFAULT nextval(''' + LOWER(c.TABLE_SCHEMA) + '.' + LOWER(c.TABLE_NAME) + '_aggseq''); + CREATE INDEX ix_' + LOWER(c.TABLE_NAME) + '_aggid ON ' + c.TABLE_SCHEMA + '.' + c.TABLE_NAME + ' (AggregateId);' AS PostgreSQL + FROM INFORMATION_SCHEMA.COLUMNS c + WHERE c.COLUMN_NAME = 'Id' and c.TABLE_SCHEMA = @schema + ORDER BY c.TABLE_SCHEMA, c.TABLE_NAME +------------------------------------------------ +*/ + +CREATE SEQUENCE edfi.academicweek_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.AcademicWeek ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.academicweek_aggseq'); +CREATE INDEX ix_academicweek_aggid ON edfi.AcademicWeek (AggregateId); + +CREATE SEQUENCE edfi.accountabilityrating_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.AccountabilityRating ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.accountabilityrating_aggseq'); +CREATE INDEX ix_accountabilityrating_aggid ON edfi.AccountabilityRating (AggregateId); + +CREATE SEQUENCE edfi.assessment_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Assessment ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.assessment_aggseq'); +CREATE INDEX ix_assessment_aggid ON edfi.Assessment (AggregateId); + +CREATE SEQUENCE edfi.assessmentitem_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.AssessmentItem ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.assessmentitem_aggseq'); +CREATE INDEX ix_assessmentitem_aggid ON edfi.AssessmentItem (AggregateId); + +CREATE SEQUENCE edfi.assessmentscorerangelearningstandard_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.AssessmentScoreRangeLearningStandard ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.assessmentscorerangelearningstandard_aggseq'); +CREATE INDEX ix_assessmentscorerangelearningstandard_aggid ON edfi.AssessmentScoreRangeLearningStandard (AggregateId); + +CREATE SEQUENCE edfi.balancesheetdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.BalanceSheetDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.balancesheetdimension_aggseq'); +CREATE INDEX ix_balancesheetdimension_aggid ON edfi.BalanceSheetDimension (AggregateId); + +CREATE SEQUENCE edfi.bellschedule_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.BellSchedule ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.bellschedule_aggseq'); +CREATE INDEX ix_bellschedule_aggid ON edfi.BellSchedule (AggregateId); + +CREATE SEQUENCE edfi.calendar_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Calendar ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.calendar_aggseq'); +CREATE INDEX ix_calendar_aggid ON edfi.Calendar (AggregateId); + +CREATE SEQUENCE edfi.calendardate_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.CalendarDate ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.calendardate_aggseq'); +CREATE INDEX ix_calendardate_aggid ON edfi.CalendarDate (AggregateId); + +CREATE SEQUENCE edfi.chartofaccount_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ChartOfAccount ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.chartofaccount_aggseq'); +CREATE INDEX ix_chartofaccount_aggid ON edfi.ChartOfAccount (AggregateId); + +CREATE SEQUENCE edfi.classperiod_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ClassPeriod ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.classperiod_aggseq'); +CREATE INDEX ix_classperiod_aggid ON edfi.ClassPeriod (AggregateId); + +CREATE SEQUENCE edfi.cohort_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Cohort ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.cohort_aggseq'); +CREATE INDEX ix_cohort_aggid ON edfi.Cohort (AggregateId); + +CREATE SEQUENCE edfi.communityproviderlicense_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.CommunityProviderLicense ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.communityproviderlicense_aggseq'); +CREATE INDEX ix_communityproviderlicense_aggid ON edfi.CommunityProviderLicense (AggregateId); + +CREATE SEQUENCE edfi.competencyobjective_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.CompetencyObjective ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.competencyobjective_aggseq'); +CREATE INDEX ix_competencyobjective_aggid ON edfi.CompetencyObjective (AggregateId); + +CREATE SEQUENCE edfi.contact_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Contact ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.contact_aggseq'); +CREATE INDEX ix_contact_aggid ON edfi.Contact (AggregateId); + +CREATE SEQUENCE edfi.course_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Course ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.course_aggseq'); +CREATE INDEX ix_course_aggid ON edfi.Course (AggregateId); + +CREATE SEQUENCE edfi.courseoffering_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.CourseOffering ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.courseoffering_aggseq'); +CREATE INDEX ix_courseoffering_aggid ON edfi.CourseOffering (AggregateId); + +CREATE SEQUENCE edfi.coursetranscript_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.CourseTranscript ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.coursetranscript_aggseq'); +CREATE INDEX ix_coursetranscript_aggid ON edfi.CourseTranscript (AggregateId); + +CREATE SEQUENCE edfi.credential_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Credential ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.credential_aggseq'); +CREATE INDEX ix_credential_aggid ON edfi.Credential (AggregateId); + +CREATE SEQUENCE edfi.crisisevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.CrisisEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.crisisevent_aggseq'); +CREATE INDEX ix_crisisevent_aggid ON edfi.CrisisEvent (AggregateId); + +CREATE SEQUENCE edfi.descriptor_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Descriptor ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.descriptor_aggseq'); +CREATE INDEX ix_descriptor_aggid ON edfi.Descriptor (AggregateId); + +CREATE SEQUENCE edfi.descriptormapping_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.DescriptorMapping ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.descriptormapping_aggseq'); +CREATE INDEX ix_descriptormapping_aggid ON edfi.DescriptorMapping (AggregateId); + +CREATE SEQUENCE edfi.disciplineaction_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.DisciplineAction ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.disciplineaction_aggseq'); +CREATE INDEX ix_disciplineaction_aggid ON edfi.DisciplineAction (AggregateId); + +CREATE SEQUENCE edfi.disciplineincident_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.DisciplineIncident ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.disciplineincident_aggseq'); +CREATE INDEX ix_disciplineincident_aggid ON edfi.DisciplineIncident (AggregateId); + +CREATE SEQUENCE edfi.educationcontent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.EducationContent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationcontent_aggseq'); +CREATE INDEX ix_educationcontent_aggid ON edfi.EducationContent (AggregateId); + +CREATE SEQUENCE edfi.educationorganization_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.EducationOrganization ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganization_aggseq'); +CREATE INDEX ix_educationorganization_aggid ON edfi.EducationOrganization (AggregateId); + +CREATE SEQUENCE edfi.educationorganizationinterventionprescriptionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.EducationOrganizationInterventionPrescriptionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganizationinterventionprescriptionassociation_aggseq'); +CREATE INDEX ix_educationorganizationinterventionprescriptionassociation_aggid ON edfi.EducationOrganizationInterventionPrescriptionAssociation (AggregateId); + +CREATE SEQUENCE edfi.educationorganizationnetworkassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.EducationOrganizationNetworkAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganizationnetworkassociation_aggseq'); +CREATE INDEX ix_educationorganizationnetworkassociation_aggid ON edfi.EducationOrganizationNetworkAssociation (AggregateId); + +CREATE SEQUENCE edfi.educationorganizationpeerassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.EducationOrganizationPeerAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.educationorganizationpeerassociation_aggseq'); +CREATE INDEX ix_educationorganizationpeerassociation_aggid ON edfi.EducationOrganizationPeerAssociation (AggregateId); + +CREATE SEQUENCE edfi.evaluationrubricdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.EvaluationRubricDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.evaluationrubricdimension_aggseq'); +CREATE INDEX ix_evaluationrubricdimension_aggid ON edfi.EvaluationRubricDimension (AggregateId); + +CREATE SEQUENCE edfi.feederschoolassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.FeederSchoolAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.feederschoolassociation_aggseq'); +CREATE INDEX ix_feederschoolassociation_aggid ON edfi.FeederSchoolAssociation (AggregateId); + +CREATE SEQUENCE edfi.functiondimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.FunctionDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.functiondimension_aggseq'); +CREATE INDEX ix_functiondimension_aggid ON edfi.FunctionDimension (AggregateId); + +CREATE SEQUENCE edfi.funddimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.FundDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.funddimension_aggseq'); +CREATE INDEX ix_funddimension_aggid ON edfi.FundDimension (AggregateId); + +CREATE SEQUENCE edfi.generalstudentprogramassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.GeneralStudentProgramAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.generalstudentprogramassociation_aggseq'); +CREATE INDEX ix_generalstudentprogramassociation_aggid ON edfi.GeneralStudentProgramAssociation (AggregateId); + +CREATE SEQUENCE edfi.grade_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Grade ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.grade_aggseq'); +CREATE INDEX ix_grade_aggid ON edfi.Grade (AggregateId); + +CREATE SEQUENCE edfi.gradebookentry_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.GradebookEntry ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.gradebookentry_aggseq'); +CREATE INDEX ix_gradebookentry_aggid ON edfi.GradebookEntry (AggregateId); + +CREATE SEQUENCE edfi.gradingperiod_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.GradingPeriod ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.gradingperiod_aggseq'); +CREATE INDEX ix_gradingperiod_aggid ON edfi.GradingPeriod (AggregateId); + +CREATE SEQUENCE edfi.graduationplan_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.GraduationPlan ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.graduationplan_aggseq'); +CREATE INDEX ix_graduationplan_aggid ON edfi.GraduationPlan (AggregateId); + +CREATE SEQUENCE edfi.intervention_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Intervention ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.intervention_aggseq'); +CREATE INDEX ix_intervention_aggid ON edfi.Intervention (AggregateId); + +CREATE SEQUENCE edfi.interventionprescription_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.InterventionPrescription ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.interventionprescription_aggseq'); +CREATE INDEX ix_interventionprescription_aggid ON edfi.InterventionPrescription (AggregateId); + +CREATE SEQUENCE edfi.interventionstudy_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.InterventionStudy ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.interventionstudy_aggseq'); +CREATE INDEX ix_interventionstudy_aggid ON edfi.InterventionStudy (AggregateId); + +CREATE SEQUENCE edfi.learningstandard_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LearningStandard ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.learningstandard_aggseq'); +CREATE INDEX ix_learningstandard_aggid ON edfi.LearningStandard (AggregateId); + +CREATE SEQUENCE edfi.learningstandardequivalenceassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LearningStandardEquivalenceAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.learningstandardequivalenceassociation_aggseq'); +CREATE INDEX ix_learningstandardequivalenceassociation_aggid ON edfi.LearningStandardEquivalenceAssociation (AggregateId); + +CREATE SEQUENCE edfi.localaccount_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LocalAccount ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localaccount_aggseq'); +CREATE INDEX ix_localaccount_aggid ON edfi.LocalAccount (AggregateId); + +CREATE SEQUENCE edfi.localactual_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LocalActual ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localactual_aggseq'); +CREATE INDEX ix_localactual_aggid ON edfi.LocalActual (AggregateId); + +CREATE SEQUENCE edfi.localbudget_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LocalBudget ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localbudget_aggseq'); +CREATE INDEX ix_localbudget_aggid ON edfi.LocalBudget (AggregateId); + +CREATE SEQUENCE edfi.localcontractedstaff_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LocalContractedStaff ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localcontractedstaff_aggseq'); +CREATE INDEX ix_localcontractedstaff_aggid ON edfi.LocalContractedStaff (AggregateId); + +CREATE SEQUENCE edfi.localencumbrance_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LocalEncumbrance ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localencumbrance_aggseq'); +CREATE INDEX ix_localencumbrance_aggid ON edfi.LocalEncumbrance (AggregateId); + +CREATE SEQUENCE edfi.localpayroll_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.LocalPayroll ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.localpayroll_aggseq'); +CREATE INDEX ix_localpayroll_aggid ON edfi.LocalPayroll (AggregateId); + +CREATE SEQUENCE edfi.location_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Location ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.location_aggseq'); +CREATE INDEX ix_location_aggid ON edfi.Location (AggregateId); + +CREATE SEQUENCE edfi.objectdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ObjectDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.objectdimension_aggseq'); +CREATE INDEX ix_objectdimension_aggid ON edfi.ObjectDimension (AggregateId); + +CREATE SEQUENCE edfi.objectiveassessment_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ObjectiveAssessment ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.objectiveassessment_aggseq'); +CREATE INDEX ix_objectiveassessment_aggid ON edfi.ObjectiveAssessment (AggregateId); + +CREATE SEQUENCE edfi.openstaffposition_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.OpenStaffPosition ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.openstaffposition_aggseq'); +CREATE INDEX ix_openstaffposition_aggid ON edfi.OpenStaffPosition (AggregateId); + +CREATE SEQUENCE edfi.operationalunitdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.OperationalUnitDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.operationalunitdimension_aggseq'); +CREATE INDEX ix_operationalunitdimension_aggid ON edfi.OperationalUnitDimension (AggregateId); + +CREATE SEQUENCE edfi.person_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Person ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.person_aggseq'); +CREATE INDEX ix_person_aggid ON edfi.Person (AggregateId); + +CREATE SEQUENCE edfi.postsecondaryevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.PostSecondaryEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.postsecondaryevent_aggseq'); +CREATE INDEX ix_postsecondaryevent_aggid ON edfi.PostSecondaryEvent (AggregateId); + +CREATE SEQUENCE edfi.program_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Program ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.program_aggseq'); +CREATE INDEX ix_program_aggid ON edfi.Program (AggregateId); + +CREATE SEQUENCE edfi.programdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ProgramDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programdimension_aggseq'); +CREATE INDEX ix_programdimension_aggid ON edfi.ProgramDimension (AggregateId); + +CREATE SEQUENCE edfi.programevaluation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ProgramEvaluation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programevaluation_aggseq'); +CREATE INDEX ix_programevaluation_aggid ON edfi.ProgramEvaluation (AggregateId); + +CREATE SEQUENCE edfi.programevaluationelement_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ProgramEvaluationElement ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programevaluationelement_aggseq'); +CREATE INDEX ix_programevaluationelement_aggid ON edfi.ProgramEvaluationElement (AggregateId); + +CREATE SEQUENCE edfi.programevaluationobjective_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ProgramEvaluationObjective ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.programevaluationobjective_aggseq'); +CREATE INDEX ix_programevaluationobjective_aggid ON edfi.ProgramEvaluationObjective (AggregateId); + +CREATE SEQUENCE edfi.projectdimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ProjectDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.projectdimension_aggseq'); +CREATE INDEX ix_projectdimension_aggid ON edfi.ProjectDimension (AggregateId); + +CREATE SEQUENCE edfi.reportcard_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.ReportCard ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.reportcard_aggseq'); +CREATE INDEX ix_reportcard_aggid ON edfi.ReportCard (AggregateId); + +CREATE SEQUENCE edfi.restraintevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.RestraintEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.restraintevent_aggseq'); +CREATE INDEX ix_restraintevent_aggid ON edfi.RestraintEvent (AggregateId); + +CREATE SEQUENCE edfi.schoolyeartype_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SchoolYearType ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.schoolyeartype_aggseq'); +CREATE INDEX ix_schoolyeartype_aggid ON edfi.SchoolYearType (AggregateId); + +CREATE SEQUENCE edfi.section_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Section ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.section_aggseq'); +CREATE INDEX ix_section_aggid ON edfi.Section (AggregateId); + +CREATE SEQUENCE edfi.sectionattendancetakenevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SectionAttendanceTakenEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.sectionattendancetakenevent_aggseq'); +CREATE INDEX ix_sectionattendancetakenevent_aggid ON edfi.SectionAttendanceTakenEvent (AggregateId); + +CREATE SEQUENCE edfi.session_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Session ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.session_aggseq'); +CREATE INDEX ix_session_aggid ON edfi.Session (AggregateId); + +CREATE SEQUENCE edfi.sourcedimension_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SourceDimension ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.sourcedimension_aggseq'); +CREATE INDEX ix_sourcedimension_aggid ON edfi.SourceDimension (AggregateId); + +CREATE SEQUENCE edfi.staff_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Staff ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staff_aggseq'); +CREATE INDEX ix_staff_aggid ON edfi.Staff (AggregateId); + +CREATE SEQUENCE edfi.staffabsenceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffAbsenceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffabsenceevent_aggseq'); +CREATE INDEX ix_staffabsenceevent_aggid ON edfi.StaffAbsenceEvent (AggregateId); + +CREATE SEQUENCE edfi.staffcohortassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffCohortAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffcohortassociation_aggseq'); +CREATE INDEX ix_staffcohortassociation_aggid ON edfi.StaffCohortAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffdisciplineincidentassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffDisciplineIncidentAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffdisciplineincidentassociation_aggseq'); +CREATE INDEX ix_staffdisciplineincidentassociation_aggid ON edfi.StaffDisciplineIncidentAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffeducationorganizationassignmentassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffEducationOrganizationAssignmentAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffeducationorganizationassignmentassociation_aggseq'); +CREATE INDEX ix_staffeducationorganizationassignmentassociation_aggid ON edfi.StaffEducationOrganizationAssignmentAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffeducationorganizationcontactassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffEducationOrganizationContactAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffeducationorganizationcontactassociation_aggseq'); +CREATE INDEX ix_staffeducationorganizationcontactassociation_aggid ON edfi.StaffEducationOrganizationContactAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffeducationorganizationemploymentassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffEducationOrganizationEmploymentAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffeducationorganizationemploymentassociation_aggseq'); +CREATE INDEX ix_staffeducationorganizationemploymentassociation_aggid ON edfi.StaffEducationOrganizationEmploymentAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffleave_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffLeave ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffleave_aggseq'); +CREATE INDEX ix_staffleave_aggid ON edfi.StaffLeave (AggregateId); + +CREATE SEQUENCE edfi.staffprogramassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffProgramAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffprogramassociation_aggseq'); +CREATE INDEX ix_staffprogramassociation_aggid ON edfi.StaffProgramAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffschoolassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffSchoolAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffschoolassociation_aggseq'); +CREATE INDEX ix_staffschoolassociation_aggid ON edfi.StaffSchoolAssociation (AggregateId); + +CREATE SEQUENCE edfi.staffsectionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StaffSectionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.staffsectionassociation_aggseq'); +CREATE INDEX ix_staffsectionassociation_aggid ON edfi.StaffSectionAssociation (AggregateId); + +CREATE SEQUENCE edfi.student_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Student ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.student_aggseq'); +CREATE INDEX ix_student_aggid ON edfi.Student (AggregateId); + +CREATE SEQUENCE edfi.studentacademicrecord_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentAcademicRecord ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentacademicrecord_aggseq'); +CREATE INDEX ix_studentacademicrecord_aggid ON edfi.StudentAcademicRecord (AggregateId); + +CREATE SEQUENCE edfi.studentassessment_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentAssessment ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentassessment_aggseq'); +CREATE INDEX ix_studentassessment_aggid ON edfi.StudentAssessment (AggregateId); + +CREATE SEQUENCE edfi.studentassessmenteducationorganizationassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentAssessmentEducationOrganizationAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentassessmenteducationorganizationassociation_aggseq'); +CREATE INDEX ix_studentassessmenteducationorganizationassociation_aggid ON edfi.StudentAssessmentEducationOrganizationAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentcohortassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentCohortAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentcohortassociation_aggseq'); +CREATE INDEX ix_studentcohortassociation_aggid ON edfi.StudentCohortAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentcompetencyobjective_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentCompetencyObjective ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentcompetencyobjective_aggseq'); +CREATE INDEX ix_studentcompetencyobjective_aggid ON edfi.StudentCompetencyObjective (AggregateId); + +CREATE SEQUENCE edfi.studentcontactassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentContactAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentcontactassociation_aggseq'); +CREATE INDEX ix_studentcontactassociation_aggid ON edfi.StudentContactAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentdisciplineincidentbehaviorassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentDisciplineIncidentBehaviorAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentdisciplineincidentbehaviorassociation_aggseq'); +CREATE INDEX ix_studentdisciplineincidentbehaviorassociation_aggid ON edfi.StudentDisciplineIncidentBehaviorAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentdisciplineincidentnonoffenderassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentDisciplineIncidentNonOffenderAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentdisciplineincidentnonoffenderassociation_aggseq'); +CREATE INDEX ix_studentdisciplineincidentnonoffenderassociation_aggid ON edfi.StudentDisciplineIncidentNonOffenderAssociation (AggregateId); + +CREATE SEQUENCE edfi.studenteducationorganizationassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentEducationOrganizationAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenteducationorganizationassociation_aggseq'); +CREATE INDEX ix_studenteducationorganizationassociation_aggid ON edfi.StudentEducationOrganizationAssociation (AggregateId); + +CREATE SEQUENCE edfi.studenteducationorganizationresponsibilityassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentEducationOrganizationResponsibilityAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenteducationorganizationresponsibilityassociation_aggseq'); +CREATE INDEX ix_studenteducationorganizationresponsibilityassociation_aggid ON edfi.StudentEducationOrganizationResponsibilityAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentgradebookentry_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentGradebookEntry ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentgradebookentry_aggseq'); +CREATE INDEX ix_studentgradebookentry_aggid ON edfi.StudentGradebookEntry (AggregateId); + +CREATE SEQUENCE edfi.studenthealth_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentHealth ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenthealth_aggseq'); +CREATE INDEX ix_studenthealth_aggid ON edfi.StudentHealth (AggregateId); + +CREATE SEQUENCE edfi.studentinterventionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentInterventionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentinterventionassociation_aggseq'); +CREATE INDEX ix_studentinterventionassociation_aggid ON edfi.StudentInterventionAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentinterventionattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentInterventionAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentinterventionattendanceevent_aggseq'); +CREATE INDEX ix_studentinterventionattendanceevent_aggid ON edfi.StudentInterventionAttendanceEvent (AggregateId); + +CREATE SEQUENCE edfi.studentprogramattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentProgramAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentprogramattendanceevent_aggseq'); +CREATE INDEX ix_studentprogramattendanceevent_aggid ON edfi.StudentProgramAttendanceEvent (AggregateId); + +CREATE SEQUENCE edfi.studentprogramevaluation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentProgramEvaluation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentprogramevaluation_aggseq'); +CREATE INDEX ix_studentprogramevaluation_aggid ON edfi.StudentProgramEvaluation (AggregateId); + +CREATE SEQUENCE edfi.studentschoolassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentSchoolAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentschoolassociation_aggseq'); +CREATE INDEX ix_studentschoolassociation_aggid ON edfi.StudentSchoolAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentschoolattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentSchoolAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentschoolattendanceevent_aggseq'); +CREATE INDEX ix_studentschoolattendanceevent_aggid ON edfi.StudentSchoolAttendanceEvent (AggregateId); + +CREATE SEQUENCE edfi.studentsectionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentSectionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentsectionassociation_aggseq'); +CREATE INDEX ix_studentsectionassociation_aggid ON edfi.StudentSectionAssociation (AggregateId); + +CREATE SEQUENCE edfi.studentsectionattendanceevent_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentSectionAttendanceEvent ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentsectionattendanceevent_aggseq'); +CREATE INDEX ix_studentsectionattendanceevent_aggid ON edfi.StudentSectionAttendanceEvent (AggregateId); + +CREATE SEQUENCE edfi.studentspecialeducationprogrameligibilityassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentSpecialEducationProgramEligibilityAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studentspecialeducationprogrameligibilityassociation_aggseq'); +CREATE INDEX ix_studentspecialeducationprogrameligibilityassociation_aggid ON edfi.StudentSpecialEducationProgramEligibilityAssociation (AggregateId); + +CREATE SEQUENCE edfi.studenttransportation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.StudentTransportation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.studenttransportation_aggseq'); +CREATE INDEX ix_studenttransportation_aggid ON edfi.StudentTransportation (AggregateId); + +CREATE SEQUENCE edfi.survey_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.Survey ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.survey_aggseq'); +CREATE INDEX ix_survey_aggid ON edfi.Survey (AggregateId); + +CREATE SEQUENCE edfi.surveycourseassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyCourseAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveycourseassociation_aggseq'); +CREATE INDEX ix_surveycourseassociation_aggid ON edfi.SurveyCourseAssociation (AggregateId); + +CREATE SEQUENCE edfi.surveyprogramassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyProgramAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyprogramassociation_aggseq'); +CREATE INDEX ix_surveyprogramassociation_aggid ON edfi.SurveyProgramAssociation (AggregateId); + +CREATE SEQUENCE edfi.surveyquestion_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyQuestion ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyquestion_aggseq'); +CREATE INDEX ix_surveyquestion_aggid ON edfi.SurveyQuestion (AggregateId); + +CREATE SEQUENCE edfi.surveyquestionresponse_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyQuestionResponse ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyquestionresponse_aggseq'); +CREATE INDEX ix_surveyquestionresponse_aggid ON edfi.SurveyQuestionResponse (AggregateId); + +CREATE SEQUENCE edfi.surveyresponse_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyResponse ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyresponse_aggseq'); +CREATE INDEX ix_surveyresponse_aggid ON edfi.SurveyResponse (AggregateId); + +CREATE SEQUENCE edfi.surveyresponseeducationorganizationtargetassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyResponseEducationOrganizationTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyresponseeducationorganizationtargetassociation_aggseq'); +CREATE INDEX ix_surveyresponseeducationorganizationtargetassociation_aggid ON edfi.SurveyResponseEducationOrganizationTargetAssociation (AggregateId); + +CREATE SEQUENCE edfi.surveyresponsestafftargetassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveyResponseStaffTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveyresponsestafftargetassociation_aggseq'); +CREATE INDEX ix_surveyresponsestafftargetassociation_aggid ON edfi.SurveyResponseStaffTargetAssociation (AggregateId); + +CREATE SEQUENCE edfi.surveysection_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveySection ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysection_aggseq'); +CREATE INDEX ix_surveysection_aggid ON edfi.SurveySection (AggregateId); + +CREATE SEQUENCE edfi.surveysectionassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveySectionAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionassociation_aggseq'); +CREATE INDEX ix_surveysectionassociation_aggid ON edfi.SurveySectionAssociation (AggregateId); + +CREATE SEQUENCE edfi.surveysectionresponse_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveySectionResponse ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionresponse_aggseq'); +CREATE INDEX ix_surveysectionresponse_aggid ON edfi.SurveySectionResponse (AggregateId); + +CREATE SEQUENCE edfi.surveysectionresponseedorgtargetassoc_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveySectionResponseEducationOrganizationTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionresponseedorgtargetassoc_aggseq'); +CREATE INDEX ix_surveysectionresponseedorgtargetassoc_aggid ON edfi.SurveySectionResponseEducationOrganizationTargetAssociation (AggregateId); + +CREATE SEQUENCE edfi.surveysectionresponsestafftargetassociation_aggseq START WITH -2147483648 INCREMENT BY 1 MINVALUE -2147483648; +ALTER TABLE edfi.SurveySectionResponseStaffTargetAssociation ADD COLUMN AggregateId int NOT NULL DEFAULT nextval('edfi.surveysectionresponsestafftargetassociation_aggseq'); +CREATE INDEX ix_surveysectionresponsestafftargetassociation_aggid ON edfi.SurveySectionResponseStaffTargetAssociation (AggregateId); From be407b697eae2e5fee954795e5faf7e0e2834f64 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Fri, 27 Sep 2024 12:18:41 -0500 Subject: [PATCH 3/6] 1480-UpdateEdFiStandardVersionTo52 Added --- .../Ods/1480-UpdateEdFiStandardVersionTo52.sql | 18 ++++++++++++++++++ .../Ods/1480-UpdateEdFiStandardVersionTo52.sql | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql create mode 100644 Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql diff --git a/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql new file mode 100644 index 000000000..1f9c9ecaf --- /dev/null +++ b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql @@ -0,0 +1,18 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Licensed to the Ed-Fi Alliance under one or more agreements. +-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. +-- See the LICENSE and NOTICES files in the project root for more information. + +IF object_id('util.GetEdFiStandardVersion', 'FN') IS NOT NULL +BEGIN + DROP FUNCTION util.GetEdFiStandardVersion; +END +GO + +CREATE FUNCTION util.GetEdFiStandardVersion() +RETURNS VARCHAR(60) +AS +BEGIN + RETURN '5.2' +END +GO \ No newline at end of file diff --git a/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql new file mode 100644 index 000000000..5e48e4526 --- /dev/null +++ b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1480-UpdateEdFiStandardVersionTo52.sql @@ -0,0 +1,11 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Licensed to the Ed-Fi Alliance under one or more agreements. +-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. +-- See the LICENSE and NOTICES files in the project root for more information. + +CREATE OR REPLACE FUNCTION util.GetEdFiStandardVersion() +RETURNS VARCHAR(60) AS $$ +BEGIN + RETURN '5.2'; +END; +$$ LANGUAGE plpgsql; \ No newline at end of file From fff9187465351291164893663f3ad6d38fd1ca42 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Sun, 29 Sep 2024 21:47:51 -0500 Subject: [PATCH 4/6] UpdateVersion to 7.3 --- .../{1450-UpdateVersionTo73.sql => 1460-UpdateVersionTo73.sql} | 0 .../{1450-UpdateVersionTo73.sql => 1460-UpdateVersionTo73.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/{1450-UpdateVersionTo73.sql => 1460-UpdateVersionTo73.sql} (100%) rename Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/{1450-UpdateVersionTo73.sql => 1460-UpdateVersionTo73.sql} (100%) diff --git a/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1450-UpdateVersionTo73.sql b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1460-UpdateVersionTo73.sql similarity index 100% rename from Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1450-UpdateVersionTo73.sql rename to Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/MsSql/Structure/Ods/1460-UpdateVersionTo73.sql diff --git a/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1450-UpdateVersionTo73.sql b/Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1460-UpdateVersionTo73.sql similarity index 100% rename from Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1450-UpdateVersionTo73.sql rename to Application/EdFi.Ods.Standard/Standard/5.2.0/Artifacts/PgSql/Structure/Ods/1460-UpdateVersionTo73.sql From ebe995ea140764d0fff27bcae716954302a188e3 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Mon, 30 Sep 2024 22:34:02 -0500 Subject: [PATCH 5/6] Updated InvalidProfiles.xml --- Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml b/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml index b1dd9eb66..6be42f41f 100644 --- a/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml +++ b/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml @@ -3,7 +3,7 @@ - + @@ -12,10 +12,10 @@ - + - + From 6ae7d6feddc16a21564da45d5ad6116e6ab1fc1f Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Mon, 30 Sep 2024 23:27:20 -0500 Subject: [PATCH 6/6] Reverted changes to InvalidProfiles.xml --- Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml b/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml index 6be42f41f..480857046 100644 --- a/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml +++ b/Application/EdFi.Ods.Profiles.Test/InvalidProfiles.xml @@ -3,7 +3,7 @@ - + @@ -12,11 +12,12 @@ - + - + +