Rhetos.AfterDeploy 6.0.0

Prefix Reserved
dotnet add package Rhetos.AfterDeploy --version 6.0.0
                    
NuGet\Install-Package Rhetos.AfterDeploy -Version 6.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rhetos.AfterDeploy" Version="6.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rhetos.AfterDeploy" Version="6.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Rhetos.AfterDeploy" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rhetos.AfterDeploy --version 6.0.0
                    
#r "nuget: Rhetos.AfterDeploy, 6.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rhetos.AfterDeploy@6.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rhetos.AfterDeploy&version=6.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Rhetos.AfterDeploy&version=6.0.0
                    
Install as a Cake Tool

AfterDeploy

Rhetos.AfterDeploy is a plugin package for Rhetos development platform. It simplifies the handling of SQL scripts that need to be executed on each deployment.

Features

  • This plugin will activate inside DeployPackages.exe, after database is upgraded.
  • It will execute all SQL scripts placed in the AfterDeploy subfolder of each deployed package.
    • Note that these SQL scripts may directly use all tables, views and other database objects. There no need for special formatting or limitations that are present in the DataMigration scripts.
  • Order of execution:
    • The SQL scripts from one package will be executed in alphabetical order, using natural sort for numbers in folder and file names.
    • The ordering of SQL scripts will respect dependencies between packages, defined in their .nuspec files.

AfterDeploy vs DataMigration scripts

AfterDeploy scripts are useful for data that is not an integral part of the business application (is not referenced by other entities) and should be refreshed on each deployment.

  • Roles and permissions are a good example. There can be one script that contains predefined roles or permissions. On each deployment the script should compare the existing data to the expected, and update the database. See the chapter "Inserting the permissions on deployment".
  • AfterDeploy scripts are executed at the end of the deployment process, after the database structure is upgraded.

DataMigration scripts are useful for data that needs to be changed when the business objects are changed in new versions of the business applications.

  • Hard-coded data tables should be initialized in data-migration scripts. These records could be modified with new versions of the applications. More importantly, these records are usually referenced from other tables, so the data-migrations scripts for the other tables might need the hard-coded data already inserted into the database.
  • DataMigration scripts are executed at the beginning of the deployment process, before the database structure is upgraded.

Installation and configuration

Installing this package to a Rhetos application:

  1. Add 'Rhetos.AfterDeploy' NuGet package, available at the NuGet.org on-line gallery.

How to contribute

Contributions are very welcome. The easiest way is to fork this repo, and then make a pull request from your fork. The first time you make a pull request, you may be asked to sign a Contributor Agreement. For more info see How to Contribute on Rhetos wiki.

Building and testing the source code

  • Note: This package is already available at the NuGet.org online gallery. You don't need to build it from source in order to use it in your application.
  • To build the package from source, run Clean.bat, Build.bat and Test.bat.
  • For the test script to work, you need to create an empty database and a settings file test\TestApp\rhetos-app.local.settings.json with the database connection string (configuration key "ConnectionStrings:RhetosConnectionString").
  • The build output is a NuGet package in the "Install" subfolder.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rhetos.AfterDeploy:

Package Downloads
Rhetos.LightDMS

LightDMS is a lightweight document storage and versioning plugin for Rhetos development platform.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.0 148 9/3/2025
5.1.0 2,253 3/16/2023
5.0.0 1,631 3/25/2022
2.0.0 833 5/14/2020
1.2.0 791 9/9/2019
1.1.0 3,979 8/2/2018
1.0.0 3,221 8/2/2018