render mode integration
This commit is contained in:
@ -8,6 +8,7 @@ using Oqtane.Repository;
|
||||
namespace Oqtane.Migrations.Tenant
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
// note that the following migration was actually for version 5.0.2 (ie. "Tenant.05.00.02.01")
|
||||
[Migration("Tenant.05.01.00.01")]
|
||||
public class AddPageEffectiveExpiryDate : MultiDatabaseMigration
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ using Oqtane.Repository;
|
||||
namespace Oqtane.Migrations.Tenant
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
// note that the following migration was actually for version 5.0.2 (ie. "Tenant.05.00.02.02")
|
||||
[Migration("Tenant.05.01.00.02")]
|
||||
public class AddPageModuleEffectiveExpiryDate : MultiDatabaseMigration
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ using Oqtane.Repository;
|
||||
namespace Oqtane.Migrations.Tenant
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
// note that the following migration was actually for version 5.0.2 (ie. "Tenant.05.00.02.03")
|
||||
[Migration("Tenant.05.01.00.03")]
|
||||
public class AddProfileAutocomplete : MultiDatabaseMigration
|
||||
{
|
||||
|
39
Oqtane.Server/Migrations/Tenant/05010004_AddSitePrerender.cs
Normal file
39
Oqtane.Server/Migrations/Tenant/05010004_AddSitePrerender.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Oqtane.Databases.Interfaces;
|
||||
using Oqtane.Migrations.EntityBuilders;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Migrations.Tenant
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
[Migration("Tenant.05.01.00.04")]
|
||||
public class AddSitePrerender : MultiDatabaseMigration
|
||||
{
|
||||
public AddSitePrerender(IDatabase database) : base(database)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
var siteEntityBuilder = new SiteEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
|
||||
siteEntityBuilder.UpdateColumn("RenderMode", $"'{RenderModes.InteractiveServer}'");
|
||||
|
||||
siteEntityBuilder.AddBooleanColumn("Prerender", true);
|
||||
siteEntityBuilder.UpdateColumn("Prerender", "1", "bool", "");
|
||||
|
||||
siteEntityBuilder.AddBooleanColumn("Hybrid", true);
|
||||
siteEntityBuilder.UpdateColumn("Hybrid", "0", "bool", "");
|
||||
|
||||
siteEntityBuilder.DropColumn("Runtime");
|
||||
siteEntityBuilder.DropColumn("HybridEnabled");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// not implemented
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user