2.26.01 Database Changes

Contents Show

Changes made to the SPIRIT WIC database in this release of the software are detailed below.

ENH-515

A new 2.26.01.asql file was created and distributed with this release. This .asql performs the following changes to the database when the SPIRIT WIC software is upgraded to version 2.26.01:

Some states may have an extra constraint on the FOODPACKAGEID column of the RISKFACTORREFERENCE table. If your state currently has an FK constraint on the FOODPACKAGEID column of the RISKFACTORREFERENCE table, the script below MUST be run manually on the database. Failure to run the script below in states that currently have an FK constraint on the FOODPACKAGEID column of the RISKFACTORREFERENCE table will cause problems with this release of the software.

IF EXISTS (SELECT * FROM sys.foreign_keys

WHERE object_id = OBJECT_ID(N'FK_RISKFACTORREF_PRIORITYWICSTS')

AND parent_object_id = OBJECT_ID(N'RISKFACTORREFERENCE')

)

ALTER TABLE [dbo].[RISKFACTORREFERENCE]

DROP CONSTRAINT [FK_RISKFACTORREF_PRIORITYWICSTS]

IF EXISTS (SELECT * FROM sys.foreign_keys

WHERE object_id = OBJECT_ID(N'FK_RISKFACTORREF_FOODPKG')

AND parent_object_id = OBJECT_ID(N'RISKFACTORREFERENCE')

)

ALTER TABLE [dbo].[RISKFACTORREFERENCE]

DROP CONSTRAINT [FK_RISKFACTORREF_FOODPKG]

ALTER TABLE [dbo].[RISKFACTORREFERENCE]

ALTER COLUMN [ASSIGNMENTRESTRICTION] CHAR (1) NULL