ExtensionMigrationPlan
Namespace: Ankus.PgConfig
Assembly: Ankus.PgConfig.dll
Describes the upgrade script that assembling the unreleased fragments writes, as pgrx’s migrate assemble and
info plan it.
public sealed class ExtensionMigrationPlanInheritance: object
Methods
Section titled “Methods”Create(ExtensionMigrationProject, string?, string?, string?)
Section titled “Create(ExtensionMigrationProject, string?, string?, string?)”Plans the upgrade script, as pgrx’s migrate assemble and info do.
public static ExtensionMigrationPlan Create(ExtensionMigrationProject project, string? targetVersion = null, string? previousVersion = null, string? outputDirectory = null)Parameters:
project — ExtensionMigrationProject
The project.
targetVersion — string
The version to upgrade to, or null for the extension’s version when it is newer than every
script in sql/, or else the next patch.
previousVersion — string
The release to upgrade from, or null for the latest in sql/.
outputDirectory — string
The directory for the script, or null for sql/.
Returns: ExtensionMigrationPlan
The plan.
Exceptions:
- InvalidOperationException: The versions or the fragments’ dependencies don’t allow a script.
ToJson()
Section titled “ToJson()”Formats the plan as JSON.
public string ToJson()Returns: string
The JSON.
ToText()
Section titled “ToText()”Formats the plan for reading.
public string ToText()Returns: string
The text.
Properties
Section titled “Properties”ExtensionName
Section titled “ExtensionName”Gets the extension’s name.
public string ExtensionName { get; }Value: string
FragmentNames
Section titled “FragmentNames”Gets the fragments’ file names, in assembly order.
public IReadOnlyList<string> FragmentNames { get; }Value: IReadOnlyList<string>
FragmentPaths
Section titled “FragmentPaths”Gets the fragments’ paths, in assembly order.
public IReadOnlyList<string> FragmentPaths { get; }Value: IReadOnlyList<string>
OutputFile
Section titled “OutputFile”Gets the script’s path.
public string OutputFile { get; }Value: string
PreviousVersion
Section titled “PreviousVersion”Gets the release the script upgrades from.
public string PreviousVersion { get; }Value: string
Script
Section titled “Script”Gets the script’s SQL.
public string Script { get; }Value: string
TargetVersion
Section titled “TargetVersion”Gets the version the script upgrades to.
public string TargetVersion { get; }Value: string