Creation of EF Core Migrations - these execute using EF Tools, but are not integrated to run programmatically
This commit is contained in:
21
Oqtane.Server/Migrations/02000101_UpdateIconColumnInPage.cs
Normal file
21
Oqtane.Server/Migrations/02000101_UpdateIconColumnInPage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Migrations
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
[Migration("Tenant.02.00.01.01")]
|
||||
public class UpdateIconColumnInPage : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
///Update Icon Field in Page
|
||||
migrationBuilder.Sql(
|
||||
@"
|
||||
UPDATE [Page]
|
||||
SET Icon = IIF(Icon <> '', 'oi oi-' + Icon, '');
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user