Skip to content

Spec NugetDbPackerDB

JamieO53 edited this page Apr 13, 2018 · 4 revisions

Return to Home page

Return to solution

NugetDbPackerDb code specifics

This is an anchor DB Solution providing common functionality available to all DB solutions. A reference to this database project is included in new database projects by default.

DdpChangeLog table

This table can be used for recording significant events in the pre-deployment and post-deployment scripts, for example re-encrypting a table when changing the encryption algorithm.

AddNdpChangeLog procedure

This procedure logs an event. The Project/Log message must be unique.

EXEC dbo.AddNdpChangeLog
    @ndpChangeProject = 'MyProject',
    @ndpChangeLog = 'Table re-encrypted'

MapNdpChangeLog function

This function tests for an event.

IF dbo.MapNdpChangeLog('MyProject', 'Table re-encrypted') IS NULL
BEGIN
    ...
    EXEC dbo.AddNdpChangeLog
        @ndpChangeProject = 'MyProject',
        @ndpChangeLog = 'Table re-encrypted'
END

Clone this wiki locally