Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Release Notes : Database Upgrade 8.1.0
Q14696 - INFO: Database Upgrade 8.1.0
With the release of WIMS Client 8.1.0 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.0 client. 

Tech Notes:

SQL Server Scripts:

FACILITY DATABASES

CREATE TABLE [dbo].[LC_PREPBATCH](
                [ID] [int] IDENTITY(1,1) NOT NULL,
                [AUDITUSER] [varchar](50) NULL,
                [AUDITTIMESTAMP] [datetime] NULL DEFAULT (getdate()),
                [NAME] [nvarchar](100) NULL,
                [NOTES] [nvarchar](1000) NULL,
                [PREPBATCHNUM] [nvarchar] (20) NOT NULL,
                [PREPDATE] [datetime] NULL,
                [METHODID] [int] NULL,
                [PREPBYID] [int] NULL,
                [STATUS] [nvarchar] (50) NULL,
                [UD1] [nvarchar](100) NULL,
                [UD2] [nvarchar](100) NULL,
                [UD3] [nvarchar](100) NULL,
                [UD4] [nvarchar](100) NULL,
                [UD5] [nvarchar](100) NULL,
                [UD6] [nvarchar](100) NULL,
                [UD7] [nvarchar](100) NULL,
                [UD8] [nvarchar](100) NULL,
                [UD9] [nvarchar](100) NULL
            ) ON [PRIMARY]

CREATE TABLE [dbo].[LC_BATCH](
                [ID] [int] IDENTITY(1,1) NOT NULL,
                [AUDITUSER] [varchar](50) NULL,
                [AUDITTIMESTAMP] [datetime] NULL DEFAULT (getdate()),
                [NAME] [nvarchar](100) NULL,
                [NOTES] [nvarchar](1000) NULL,
                [BATCHNUM] [nvarchar] (20) NOT NULL,
                [STARTDATE] [datetime] NULL,
                [ENDDATE] [datetime] NULL,
                [STATUS] [nvarchar] (50) NULL,
                [UD1] [nvarchar](100) NULL,
                [UD2] [nvarchar](100) NULL,
                [UD3] [nvarchar](100) NULL,
                [UD4] [nvarchar](100) NULL,
                [UD5] [nvarchar](100) NULL,
                [UD6] [nvarchar](100) NULL,
                [UD7] [nvarchar](100) NULL,
                [UD8] [nvarchar](100) NULL,
                [UD9] [nvarchar](100) NULL
            ) ON [PRIMARY]

ALTER TABLE LC_SAMPLETEST ADD BATCHID [numeric](18, 0) NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD BATCHORDER [numeric](18, 0) NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD BATCHRECTYPE [nvarchar](20)  NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD BATCHQCFORMULA [nvarchar](50) NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD BATCHQCRESULT [float] NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD BATCHQCUNITS [nvarchar](20)  NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD PREPBATCHID [numeric](18, 0) NULL DEFAULT (NULL)
ALTER TABLE LC_SAMPLETEST ADD PREPBATCHORDER [numeric](18, 0) NULL DEFAULT (NULL)

ALTER TABLE LOGBOOKENTRIES ADD FLAG NVARCHAR(50) NULL DEFAULT (NULL)
ALTER TABLE LOGBOOKENTRIES ADD TYPE NVARCHAR(50) NULL DEFAULT (NULL)
ALTER TABLE LOGBOOKENTRIES ADD UD1 NVARCHAR(255) NULL DEFAULT (NULL)
ALTER TABLE LOGBOOKENTRIES ADD UD2 NVARCHAR(255) NULL DEFAULT (NULL)
ALTER TABLE LOGBOOKENTRIES ADD UD3 NVARCHAR(255) NULL DEFAULT (NULL)
ALTER TABLE LOGBOOKENTRIES ADD UD4 NVARCHAR(255) NULL DEFAULT (NULL)
ALTER TABLE LOGBOOKENTRIES ADD UD5 NVARCHAR(255) NULL DEFAULT (NULL)

CREATE TABLE [dbo].[LOGENTRYTYPE](
                [ID] [int] IDENTITY(1,1) NOT NULL,
                [AUDITUSER] [varchar](50) NULL,
                [AUDITTIMESTAMP] [datetime] NULL DEFAULT (getdate()),
                [ENTRYTYPE] [nvarchar](50) NULL,
                [DESCRIPTION] [nvarchar](1000) NULL
            ) ON [PRIMARY]

CREATE TABLE [dbo].[LOGENTRYFLAG](
                [ID] [int] IDENTITY(1,1) NOT NULL,
                [AUDITUSER] [varchar](50) NULL,
                [AUDITTIMESTAMP] [datetime] NULL DEFAULT (getdate()),
                [FLAGNAME] [nvarchar](50) NULL,
                [DESCRIPTION] [nvarchar](1000) NULL,
                [FILEDATA] [image] NULL
            ) ON [PRIMARY]

ORACLE:

 

FACILITY DATABASES

CREATE TABLE "LC_PREPBATCH" ( 
   "ID" NUMBER NOT NULL,
   "AUDITUSER" VARCHAR2(50) NULL,
   "AUDITTIMESTAMP" DATE DEFAULT NULL,
   "NAME" nvarchar2 (100) NULL,
   "NOTES" nvarchar2 (500) NULL,
   "BATCHNUM" nvarchar2 (500) NULL,
   "STARTDATE" DATE NULL,
   "ENDDATE" DATE NULL,
   "STATUS" nvarchar2 (50) NULL,
   "UD1" nvarchar2 (100) NULL,
   "UD2" nvarchar2 (100) NULL,
   "UD3" nvarchar2 (100) NULL,
   "UD4" nvarchar2 (100) NULL,
   "UD5" nvarchar2 (100) NULL,
   "UD6" nvarchar2 (100) NULL,
   "UD7" nvarchar2 (100) NULL,
   "UD8" nvarchar2 (100) NULL,
   "UD9" nvarchar2 (100) NULL)

CREATE TABLE "LC_BATCH"("ID" NUMBER NOT NULL, "AUDITUSER" VARCHAR2(50) NULL, "AUDITTIMESTAMP" DATE DEFAULT NULL, "NAME" nvarchar2 (100) NULL,"NOTES" nvarchar2 (500) NULL,"BATCHNUM" nvarchar2 (500) NULL,"STARTDATE" DATE NULL,"ENDDATE" DATE NULL,"STATUS" nvarchar2 (50) NULL,"UD1" nvarchar2 (100) NULL,"UD2" nvarchar2 (100) NULL,"UD3" nvarchar2 (100) NULL,"UD4" nvarchar2 (100) NULL,"UD5" nvarchar2 (100) NULL,"UD6" nvarchar2 (100) NULL,"UD7" nvarchar2 (100) NULL,"UD8" nvarchar2 (100) NULL,"UD9" nvarchar2 (100) NULL)

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

CREATE TRIGGER "T_LC_BATCH" BEFORE INSERT ON "LC_BATCH" FOR EACH ROW BEGIN SELECT "A_LC_BATCH".NEXTVAL INTO :NEW."ID" FROM DUAL; END T_LC_BATCH;

ALTER TABLE LC_SAMPLETEST ADD BATCHID NUMBER DEFAULT NULL
ALTER TABLE LC_SAMPLETEST ADD BATCHORDER NUMBER DEFAULT NULL
ALTER TABLE LC_SAMPLETEST ADD BATCHRECTYPE NVARCHAR2(20) NULL
ALTER TABLE LC_SAMPLETEST ADD BATCHQCFORMULA NVARCHAR2(50) NULL
ALTER TABLE LC_SAMPLETEST ADD BATCHQCRESULT NUMBER NULL
ALTER TABLE LC_SAMPLETEST ADD BATCHQCUNITS NVARCHAR2(20) NULL
ALTER TABLE LC_SAMPLETEST ADD PREPBATCHID NUMBER DEFAULT NULL
ALTER TABLE LC_SAMPLETEST ADD PREPBATCHORDER NUMBER DEFAULT NULL

ALTER TABLE LOGBOOKENTRIES ADD FLAG NVARCHAR2(50) DEFAULT NULL
ALTER TABLE LOGBOOKENTRIES ADD TYPE NVARCHAR2(50) DEFAULT NULL
ALTER TABLE LOGBOOKENTRIES ADD UD1 NVARCHAR2(255) DEFAULT NULL
ALTER TABLE LOGBOOKENTRIES ADD UD2 NVARCHAR2(255) DEFAULT NULL
ALTER TABLE LOGBOOKENTRIES ADD UD3 NVARCHAR2(255) DEFAULT NULL
ALTER TABLE LOGBOOKENTRIES ADD UD4 NVARCHAR2(255) DEFAULT NULL
ALTER TABLE LOGBOOKENTRIES ADD UD5 NVARCHAR2(255) DEFAULT 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 12/14/2021 4:26 PM.
Last Modified on 12/14/2021 4:30 PM.
Last Modified by Scott Dorner.
Article has been viewed 1633 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article