Nucleus .Net Core CMS

DatabaseSchemaScript Class

Namespace: Nucleus.Data.Common
Assembly: Nucleus.Data.Common.dll
The DatabaseSchemaScript class represents database upgrade script meta-data and content.
DatabaseSchemaScript (String fullName, Version version, String content)
Represents a database schema update script.
Parameters
Name Type
fullName String

Script file name

version Version
content String
Script contents (sql commands)
Script name (resource/file name)
Script schema version. This is extracted from the filename.
Remarks
Script file names should consist of a three-part version number, with Major.Minor.Build separated by dots.
BuildManifestSchemaScript (Assembly scriptsAssembly, String scriptNamespace, String resourceName)
Create a DatabaseSchemaScript object representing an embedded database script.
Parameters
Name Type
scriptsAssembly System.Reflection.Assembly
scriptNamespace String
resourceName String

Relative name of an embedded database script within the scripts namespace.

Returns
A DatabaseSchemaScript object
CanParseVersion (String scriptNamespace, String resourceName)
Determine whether the filename of an embedded resource file is a version number.
Parameters
Name Type
scriptNamespace String
resourceName String

Name of an embedded database script.

ParseVersion (String resourceName)
Parse the filename of an embedded resource file and return its version number.
Parameters
Name Type
resourceName String

Name of an embedded database script.

Returns
System.Version containing the embedded script file version. The version is the file name without the file extension.