Skip to content

Commit

Permalink
[ODS-6357] Replace Student Transportation Example (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
simpat-jesus authored Jun 4, 2024
1 parent 6578b71 commit 04569d4
Show file tree
Hide file tree
Showing 63 changed files with 6,437 additions and 2,849 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// 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.

Association StudentAlternativeEducationProgramAssociation based on EdFi.GeneralStudentProgramAssociation
documentation "This association represents Students in an Alternative Education Program."
descriptor AlternativeEducationEligibilityReason
documentation "The reason the student is eligible for the program."
is required
common EdFi.MeetingTime
documentation "The times at which this Alternative Education Program is scheduled to meet."
is optional collection
is optional collection
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
// 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.

Descriptor AlternativeEducationEligibilityReason
documentation "This descriptor describes the reason a student is eligible for an Alternative Education Program"
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
// 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 SCHEMA samplealternativeeducationprogram AUTHORIZATION postgres;
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

-- Table samplealternativeeducationprogram.AlternativeEducationEligibilityReasonDescriptor --
CREATE TABLE samplealternativeeducationprogram.AlternativeEducationEligibilityReasonDescriptor (
AlternativeEducationEligibilityReasonDescriptorId INT NOT NULL,
Expand Down Expand Up @@ -30,4 +35,3 @@ CREATE TABLE samplealternativeeducationprogram.StudentAlternativeEducationProgra
CONSTRAINT StudentAlternativeEducationProgramAssociationMeetingTime_PK PRIMARY KEY (BeginDate, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI, EndTime, StartTime)
);
ALTER TABLE samplealternativeeducationprogram.StudentAlternativeEducationProgramAssociationMeetingTime ALTER COLUMN CreateDate SET DEFAULT current_timestamp AT TIME ZONE 'UTC';

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

ALTER TABLE samplealternativeeducationprogram.AlternativeEducationEligibilityReasonDescriptor ADD CONSTRAINT FK_683552_Descriptor FOREIGN KEY (AlternativeEducationEligibilityReasonDescriptorId)
REFERENCES edfi.Descriptor (DescriptorId)
ON DELETE CASCADE
Expand All @@ -19,4 +24,3 @@ ALTER TABLE samplealternativeeducationprogram.StudentAlternativeEducationProgram
REFERENCES samplealternativeeducationprogram.StudentAlternativeEducationProgramAssociation (BeginDate, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI)
ON DELETE CASCADE
;

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

-- Extended Properties [samplealternativeeducationprogram].[AlternativeEducationEligibilityReasonDescriptor] --
COMMENT ON TABLE samplealternativeeducationprogram.AlternativeEducationEligibilityReasonDescriptor IS 'This descriptor describes the reason a student is eligible for an Alternative Education Program';
COMMENT ON COLUMN samplealternativeeducationprogram.AlternativeEducationEligibilityReasonDescriptor.AlternativeEducationEligibilityReasonDescriptorId IS 'A unique identifier used as Primary Key, not derived from business logic, when acting as Foreign Key, references the parent table.';
Expand All @@ -22,4 +27,3 @@ COMMENT ON COLUMN samplealternativeeducationprogram.StudentAlternativeEducationP
COMMENT ON COLUMN samplealternativeeducationprogram.StudentAlternativeEducationProgramAssociationMeetingTime.StudentUSI IS 'A unique alphanumeric code assigned to a student.';
COMMENT ON COLUMN samplealternativeeducationprogram.StudentAlternativeEducationProgramAssociationMeetingTime.EndTime IS 'An indication of the time of day the meeting time ends.';
COMMENT ON COLUMN samplealternativeeducationprogram.StudentAlternativeEducationProgramAssociationMeetingTime.StartTime IS 'An indication of the time of day the meeting time begins.';

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

DO $$
BEGIN
IF NOT EXISTS(
Expand All @@ -10,4 +15,4 @@ BEGIN
END IF;

END
$$;
$$;
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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 SEQUENCE IF NOT EXISTS changes.ChangeVersionSequence START WITH 1;

CREATE OR REPLACE FUNCTION changes.updateChangeVersion()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

DO $$
BEGIN

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

DO $$
BEGIN
CREATE OR REPLACE FUNCTION tracked_changes_samplealternativeeducationprogram.alternativeeducationeligibilityreasondescriptor_deleted()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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 NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'samplealternativeeducationprogram')
EXEC sys.sp_executesql N'CREATE SCHEMA [samplealternativeeducationprogram]'
GO
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

-- Table [samplealternativeeducationprogram].[AlternativeEducationEligibilityReasonDescriptor] --
CREATE TABLE [samplealternativeeducationprogram].[AlternativeEducationEligibilityReasonDescriptor] (
[AlternativeEducationEligibilityReasonDescriptorId] [INT] NOT NULL,
Expand Down Expand Up @@ -52,4 +57,3 @@ CREATE TABLE [samplealternativeeducationprogram].[StudentAlternativeEducationPro
GO
ALTER TABLE [samplealternativeeducationprogram].[StudentAlternativeEducationProgramAssociationMeetingTime] ADD CONSTRAINT [StudentAlternativeEducationProgramAssociationMeetingTime_DF_CreateDate] DEFAULT (getutcdate()) FOR [CreateDate]
GO

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

ALTER TABLE [samplealternativeeducationprogram].[AlternativeEducationEligibilityReasonDescriptor] WITH CHECK ADD CONSTRAINT [FK_AlternativeEducationEligibilityReasonDescriptor_Descriptor] FOREIGN KEY ([AlternativeEducationEligibilityReasonDescriptorId])
REFERENCES [edfi].[Descriptor] ([DescriptorId])
ON DELETE CASCADE
Expand All @@ -20,4 +25,3 @@ ALTER TABLE [samplealternativeeducationprogram].[StudentAlternativeEducationProg
REFERENCES [samplealternativeeducationprogram].[StudentAlternativeEducationProgramAssociation] ([BeginDate], [EducationOrganizationId], [ProgramEducationOrganizationId], [ProgramName], [ProgramTypeDescriptorId], [StudentUSI])
ON DELETE CASCADE
GO

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

-- Extended Properties [samplealternativeeducationprogram].[AlternativeEducationEligibilityReasonDescriptor] --
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'This descriptor describes the reason a student is eligible for an Alternative Education Program', @level0type=N'SCHEMA', @level0name=N'samplealternativeeducationprogram', @level1type=N'TABLE', @level1name=N'AlternativeEducationEligibilityReasonDescriptor'
GO
Expand Down Expand Up @@ -41,4 +46,3 @@ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'An indication
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'An indication of the time of day the meeting time begins.', @level0type=N'SCHEMA', @level0name=N'samplealternativeeducationprogram', @level1type=N'TABLE', @level1name=N'StudentAlternativeEducationProgramAssociationMeetingTime', @level2type=N'COLUMN', @level2name=N'StartTime'
GO

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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 NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'changes')
EXEC sys.sp_executesql N'CREATE SCHEMA [changes]'
GO
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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 NOT EXISTS (SELECT * FROM sys.sequences WHERE object_id = OBJECT_ID(N'[changes].[ChangeVersionSequence]'))
BEGIN
CREATE SEQUENCE [changes].[ChangeVersionSequence] START WITH 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// 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 NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'tracked_changes_samplealternativeeducationprogram')
EXEC sys.sp_executesql N'CREATE SCHEMA [tracked_changes_samplealternativeeducationprogram]'
GO

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// 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.

DROP TRIGGER IF EXISTS [samplealternativeeducationprogram].[samplealternativeeducationprogram_AlternativeEducationEligibilityReasonDescriptor_TR_DeleteTracking]
GO

Expand All @@ -17,5 +22,3 @@ GO

ALTER TABLE [samplealternativeeducationprogram].[AlternativeEducationEligibilityReasonDescriptor] ENABLE TRIGGER [samplealternativeeducationprogram_AlternativeEducationEligibilityReasonDescriptor_TR_DeleteTracking]
GO


Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Sample/Versions/1.0.0/Standard/4
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Sample/Versions/1.0.0/Standard/4.0.0/Pipelines/CreateOrUpdatePipelines.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Sample/Versions/1.0.0/Standard/4.0.0/Requests/Requests.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Sample/Versions/1.0.0/Standard/4.0.0/Resources/Resources.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Authorization/EntityAuthorizationContextProviders.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Controllers/Controllers.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/EntityOrmMappings/MsSql/EntityOrmMappings.generated.hbm.xml
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/EntityOrmMappings/PgSql/EntityOrmMappings.generated.hbm.xml
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/ExceptionHandling/DatabaseMetadata.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Models/Entities/Entities.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Models/Interfaces/EntityInterfaces.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Models/Mappers/EntityMapper.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Pipelines/CreateOrUpdatePipelines.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Requests/Requests.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleAlternativeEducationProgram/Versions/1.0.0/Standard/4.0.0/Resources/Resources.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions/1.0.0/Standard/4.0.0/Authorization/EntityAuthorizationContextProviders.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions/1.0.0/Standard/4.0.0/Controllers/Controllers.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions/1.0.0/Standard/4.0.0/EntityOrmMappings/MsSql/EntityOrmMappings.generated.hbm.xml
Expand All @@ -31,17 +42,6 @@ Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions/1.0.0/Standard/4.0.0/Pipelines/CreateOrUpdatePipelines.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions/1.0.0/Standard/4.0.0/Requests/Requests.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTranscript/Versions/1.0.0/Standard/4.0.0/Resources/Resources.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Authorization/EntityAuthorizationContextProviders.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Controllers/Controllers.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/EntityOrmMappings/MsSql/EntityOrmMappings.generated.hbm.xml
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/EntityOrmMappings/PgSql/EntityOrmMappings.generated.hbm.xml
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/ExceptionHandling/DatabaseMetadata.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Models/Entities/Entities.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Models/Interfaces/EntityInterfaces.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Models/Mappers/EntityMapper.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Pipelines/CreateOrUpdatePipelines.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Requests/Requests.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.SampleStudentTransportation/Versions/1.0.0/Standard/4.0.0/Resources/Resources.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.TPDM/Versions/1.1.0/Standard/4.0.0/Authorization/EntityAuthorizationContextProviders.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.TPDM/Versions/1.1.0/Standard/4.0.0/Controllers/Controllers.generated.cs
Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.TPDM/Versions/1.1.0/Standard/4.0.0/EntityOrmMappings/MsSql/EntityOrmMappings.generated.hbm.xml
Expand Down
Loading

0 comments on commit 04569d4

Please sign in to comment.