30 lines
914 B
C#
30 lines
914 B
C#
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Oqtane.Databases.Interfaces;
|
|
using Oqtane.Migrations.EntityBuilders;
|
|
using Oqtane.Repository;
|
|
|
|
namespace Oqtane.Migrations.Tenant
|
|
{
|
|
[DbContext(typeof(TenantDBContext))]
|
|
[Migration("Tenant.04.00.06.01")]
|
|
public class AddProfileRows : MultiDatabaseMigration
|
|
{
|
|
public AddProfileRows(IDatabase database) : base(database)
|
|
{
|
|
}
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
var profileEntityBuilder = new ProfileEntityBuilder(migrationBuilder, ActiveDatabase);
|
|
profileEntityBuilder.AddIntegerColumn("Rows", true);
|
|
profileEntityBuilder.UpdateColumn("Rows", "1");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
// not implemented
|
|
}
|
|
}
|
|
}
|