Home : Database Upgrade 8.1.2
Q14706 - INFO: Database Upgrade 8.1.2
With the release of WIMS Client 8.1.2 a database upgrade is required.  The upgrade is automatically applied when logging into a Facility Database for the first time with the WIMS 8.1.2. 

Tech Notes:

SQL Server Scripts:

FACILITY DATABASES

ALTER TABLE LC_BATCH ADD STARTANALYST [nvarchar](120)  NULL DEFAULT (NULL)
ALTER TABLE LC_BATCH ADD ENDANALYST [nvarchar](120)  NULL DEFAULT (NULL)

ALTER TABLE LC_SAMPLETEST ADD STID INT IDENTITY(1,1) NOT NULL

ALTER TABLE LC_SAMPLETEST ADD BATCHQCUNITS  [nvarchar](20)  NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD BATCHQCDECPLACES  [numeric](18, 0) NULL

ALTER TABLE LC_TESTQC ADD QCUNITS  [nvarchar](20)  NULL DEFAULT (NULL)
ALTER TABLE LC_TESTQC ADD QCDECPLACES  [numeric](18, 0) NULL

CREATE TABLE [dbo].[LC_BATCHTEMPLATE](
            [ID] [int] IDENTITY(1,1) NOT NULL,
            [AUDITUSER] [varchar](50) NULL,
            [AUDITTIMESTAMP] [datetime] NULL DEFAULT (getdate()),
            [NAME] [nvarchar](100) NULL,
            [DATESETTING] [nvarchar](50) NULL,"
            [STARTANALYST] [nvarchar] (120) NULL,
            [ENDANALYST] [nvarchar] (120) NULL,
            [NOTES] [nvarchar](100) NULL
        ) ON [PRIMARY]


ALTER TABLE LC_BATCHTEMPLATE ADD SHOWOPTIONS [nvarchar](50) NULL       

ALTER TABLE LC_BATCHTEMPLATE ADD AISHOW [numeric](18, 0) NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMHEIGHT [numeric](18, 0) NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMWIDTH [numeric](18, 0) NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMLEFT [numeric](18, 0) NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMTOP [numeric](18, 0) NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AICOLWIDTH1 [numeric](18, 0) NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AICOLWIDTH2 [numeric](18, 0) NULL

ALTER TABLE LC_BATCHTEMPLATE ADD WINDOWSTATE NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMHEIGHT NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMWIDTH NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMLEFT NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMTOP NUMBER NULL

ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH1 [numeric](18, 0) NULL

ORACLE:

 

FACILITY DATABASES

DROP SEQUENCE A_LC_TESTQC
DROP TRIGGER T_LC_TESTQC

ALTER TABLE LC_BATCH ADD STARTANALYST NVARCHAR2(120) NULL
ALTER TABLE LC_BATCH ADD ENDANALYST NVARCHAR2(120) NULL

ALTER TABLE LC_SAMPLETEST ADD STID NUMBER NOT NULL
if LC_SAMPLETEST is empty:

UPDATE LC_SAMPLETEST SET STID=ROWNUM
RecCnt = SELECT MAX(STID) from LC_SAMPLETEST
RecCnt = RecCnt + 1

else

RecCnt = 1

endif
CREATE SEQUENCE "A_LC_ST" INCREMENT BY 1 START WITH " & strRecCnt & " MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE CACHE 20 NOORDER               
CREATE TRIGGER "T_LC_ST"  BEFORE INSERT ON "LC_SAMPLETEST" FOR EACH ROW BEGIN SELECT "A_LC_ST" .NEXTVAL INTO :NEW."STID" FROM DUAL; END T_LC_ST;

ALTER TABLE LC_SAMPLETEST ADD BATCHQCUNITS  NVARCHAR2(120) NULL
ALTER TABLE LC_SAMPLETEST ADD BATCHQCDECPLACES  NUMBER NULL

ALTER TABLE LC_TESTQC ADD QCUNITS  NVARCHAR2(120) NULL
ALTER TABLE LC_TESTQC ADD QCDECPLACES NUMBER NULL

CREATE TABLE "LC_BATCHTEMPLATE" 
            ("ID" NUMBER NOT NULL, 
            "AUDITUSER"  VARCHAR2(50) NULL, 
            "AUDITTIMESTAMP"  DATE DEFAULT NULL, 
            "NAME"  nvarchar2 (100) NULL
            "DATESETTING"  nvarchar2 (50) NULL
            "STARTANALYST" nvarchar2 (120) NULL
            "NOTES" nvarchar2 (500) NULL)

CREATE SEQUENCE "A_LC_BATCHTEMPLATE"  INCREMENT BY 1 START WITH 1 MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE CACHE 20 NOORDER

CREATE TRIGGER "T_LC_BATCHTEMPLATE" BEFORE INSERT ON "LC_BATCHTEMPLATE"  FOR EACH ROW BEGIN SELECT  "A_LC_BATCHTEMPLATE" .NEXTVAL INTO :NEW."ID"  FROM DUAL; END T_LC_BATCHTEMPLATE;

ALTER TABLE LC_BATCHTEMPLATE ADD SHOWOPTIONS nvarchar2 (50) NULL


ALTER TABLE LC_BATCHTEMPLATE ADD AISHOW NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMHEIGHT NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMWIDTH NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMLEFT NUMBER NULL       
ALTER TABLE LC_BATCHTEMPLATE ADD AIFORMTOP NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AICOLWIDTH1 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD AICOLWIDTH2 NUMBER NULL

ALTER TABLE LC_BATCHTEMPLATE ADD WINDOWSTATE NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMHEIGHT NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMWIDTH NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMLEFT NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD FORMTOP NUMBER NULL

ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH1 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH2 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH3 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH4 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH5 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH6 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH7 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH8 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH9 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH10 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH11 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH12 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH13 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH14 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH15 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH16 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH17 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH18 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH19 NUMBER NULL
ALTER TABLE LC_BATCHTEMPLATE ADD COLWIDTH20 NUMBER NULL

CREATE TABLE "LC_BATCHTEMPLATETESTS" 
            ("BATCHTEMPLATEID" NUMBER NOT NULL, 
            "AUDITUSER" VARCHAR2(50) NULL,
            "AUDITTIMESTAMP"  DATE DEFAULT NULL,
            "TESTID" NUMBER NOT NULL)


CREATE TABLE "LC_BATCHTEMPLATEQC"
            "("BATCHTEMPLATEID"  NUMBER NOT NULL, 
            "AUDITUSER" VARCHAR2(50) NULL, 
            "AUDITTIMESTAMP"  DATE DEFAULT NULL, 
            "TESTID"  NUMBER NOT NULL)

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 3/15/2022 10:57 AM.
Last Modified on 3/23/2022 3:58 PM.
Last Modified by Scott Dorner.
Article has been viewed 510 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article