Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #56

Merged
merged 2 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/ddl/CEDS-IDS.sql
Binary file not shown.
4 changes: 2 additions & 2 deletions src/metadata/Populate-CEDS-Element-Tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

*/

-- Uncomment next two lines to update a database named CEDS-IDS-V10_0_0_0 or specify appropriate DB name for your server.
--USE [CEDS-IDS-V10_0_0_0];
-- Uncomment next two lines to update a database named CEDS-IDS-V10_0_1_0 or specify appropriate DB name for your server.
--USE [CEDS-IDS-V10_0_1_0];
--GO


Expand Down
4 changes: 2 additions & 2 deletions src/reference-data/Populate-CEDS-Ref-Tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

*/

-- Uncomment next two lines to update a database named CEDS-IDS-V10_0_0_0 or specify appropriate DB name for your server.
--USE [CEDS-IDS-V10_0_0_0];
-- Uncomment next two lines to update a database named CEDS-IDS-V10_0_1_0 or specify appropriate DB name for your server.
--USE [CEDS-IDS-V10_0_1_0];
--GO

-- change @updateExisting to 1 to update all existing Ref table values matching Codes and for Ref tables that include a FK to other Ref tables (not RefJurisdictionId) matching Code and Description
Expand Down
43 changes: 43 additions & 0 deletions src/upgrade/V10-to-V10.0.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/****** Object: Table [dbo].[OrganizationPersonRoleRelationship] Script Date: 5/26/2022 8:56:58 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[OrganizationPersonRoleRelationship](
[OrganizationPersonRoleRelationshipId] [int] IDENTITY(1,1) NOT NULL,
[OrganizationPersonRoleId] [int] NOT NULL,
[OrganizationPersonRoleId_Parent] [int] NOT NULL,
[RecordStartDateTime] [datetime] NULL,
[RecordEndDateTime] [datetime] NULL,
[DataCollectionId] [int] NULL,
CONSTRAINT [PK_OrganizationPersonRoleRelationship] PRIMARY KEY CLUSTERED
(
[OrganizationPersonRoleRelationshipId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[OrganizationPersonRoleRelationship] WITH CHECK ADD CONSTRAINT [FK_OrganizationPersonRoleRelationship_DataCollection] FOREIGN KEY([DataCollectionId])
REFERENCES [dbo].[DataCollection] ([DataCollectionId])
GO

ALTER TABLE [dbo].[OrganizationPersonRoleRelationship] CHECK CONSTRAINT [FK_OrganizationPersonRoleRelationship_DataCollection]
GO

ALTER TABLE [dbo].[OrganizationPersonRoleRelationship] WITH CHECK ADD CONSTRAINT [FK_OrganizationPersonRoleRelationship_OrganizationPersonRole] FOREIGN KEY([OrganizationPersonRoleId])
REFERENCES [dbo].[OrganizationPersonRole] ([OrganizationPersonRoleId])
GO

ALTER TABLE [dbo].[OrganizationPersonRoleRelationship] CHECK CONSTRAINT [FK_OrganizationPersonRoleRelationship_OrganizationPersonRole]
GO

ALTER TABLE [dbo].[OrganizationPersonRoleRelationship] WITH CHECK ADD CONSTRAINT [FK_OrganizationPersonRoleRelationship_OrganizationPersonRole_Parent] FOREIGN KEY([OrganizationPersonRoleId_Parent])
REFERENCES [dbo].[OrganizationPersonRole] ([OrganizationPersonRoleId])
GO

ALTER TABLE [dbo].[OrganizationPersonRoleRelationship] CHECK CONSTRAINT [FK_OrganizationPersonRoleRelationship_OrganizationPersonRole_Parent]
GO