Skip to content

Commit afce71c

Browse files
authored
Consolidate bootstrap SQL scripts to 0.00-19.10.sql (#348)
1 parent 462d1f5 commit afce71c

3 files changed

Lines changed: 40 additions & 68 deletions

File tree

snprc_ehr/resources/schemas/dbscripts/sqlserver/snprc_ehr-0.00-18.20.sql renamed to snprc_ehr/resources/schemas/dbscripts/sqlserver/snprc_ehr-0.00-19.10.sql

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,4 +832,43 @@ CREATE TABLE [snprc_ehr].[FeeScheduleSpeciesLookup] (
832832
CONSTRAINT [FK_FeeScheduleSpeciesLookup_container] FOREIGN KEY (Container) REFERENCES core.Containers (EntityId) );
833833
GO
834834

835-
ALTER TABLE snprc_ehr.package ADD pkgType NVARCHAR(1) not null default 'U';
835+
ALTER TABLE snprc_ehr.package ADD pkgType NVARCHAR(1) not null default 'U';
836+
837+
EXEC core.fn_dropifexists 'valid_birth_code','snprc_ehr', 'TABLE';
838+
EXEC core.fn_dropifexists 'valid_death_code','snprc_ehr', 'TABLE';
839+
840+
EXEC core.fn_dropifexists 'LocationTemperature','snprc_ehr', 'TABLE';
841+
842+
GO
843+
/*************************************
844+
ObjectId should be populated before insert.
845+
846+
847+
srr 02.25.2019
848+
*************************************/
849+
850+
CREATE TABLE [snprc_ehr].[LocationTemperature](
851+
[Room] [varchar](100) NOT NULL,
852+
[Date] [DATETIME] NOT NULL,
853+
[LowTemperature] [NUMERIC](6, 2) NULL,
854+
[HighTemperature] [NUMERIC](6, 2) NULL,
855+
[Notify] [VARCHAR](18) NULL,
856+
[ObjectId] UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID(),
857+
[user_name] [VARCHAR](128) NOT NULL,
858+
[entry_date_tm] [DATETIME] NOT NULL,
859+
[Container] [entityID] NOT NULL,
860+
[Created] DATETIME,
861+
[CreatedBy] USERID,
862+
[Modified] DATETIME,
863+
[ModifiedBy] USERID
864+
865+
CONSTRAINT [PK_LocationTemperature] PRIMARY KEY CLUSTERED ([Room] ASC,[Date] ASC)
866+
CONSTRAINT FK_snprc_LocationTemperature_container FOREIGN KEY (Container) REFERENCES core.Containers (EntityId)
867+
868+
)
869+
GO
870+
871+
872+
CREATE UNIQUE INDEX idx_snprc_LocationTemperature_objectid ON snprc_ehr.LocationTemperature (ObjectId);
873+
CREATE UNIQUE INDEX idx_snprc_LocationTemperature_Room ON snprc_ehr.LocationTemperature (Room);
874+
GO

snprc_ehr/resources/schemas/dbscripts/sqlserver/snprc_ehr-18.30-18.31.sql

Lines changed: 0 additions & 17 deletions
This file was deleted.

snprc_ehr/resources/schemas/dbscripts/sqlserver/snprc_ehr-18.31-18.32.sql

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)