fix migrations
This commit is contained in:
@@ -16,8 +16,8 @@ namespace Oqtane.Migrations.Tenant
|
|||||||
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
var urlMappingEntityBuilder = new UrlMappingEntityBuilder(migrationBuilder, ActiveDatabase);
|
// the original 10.00.02.03 migration was missing the nullable property specification
|
||||||
urlMappingEntityBuilder.AddStringColumn("Referrer", 2048);
|
// this would cause it to fail on upgrade so the migration logic was moved to 10.00.03.01
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Oqtane.Databases.Interfaces;
|
using Oqtane.Databases.Interfaces;
|
||||||
@@ -17,8 +18,7 @@ namespace Oqtane.Migrations.Tenant
|
|||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
var urlMappingEntityBuilder = new UrlMappingEntityBuilder(migrationBuilder, ActiveDatabase);
|
var urlMappingEntityBuilder = new UrlMappingEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||||
urlMappingEntityBuilder.DropColumn("Referrer");
|
urlMappingEntityBuilder.AddStringColumn("Referrer", 2048, true);
|
||||||
urlMappingEntityBuilder.AddStringColumn("Referrer", 2048, true); // must be nullable
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
|||||||
Reference in New Issue
Block a user