33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Oqtane.Databases.Interfaces;
|
|
using Oqtane.Migrations;
|
|
using SZUAbsolventenverein.Module.PremiumArea.Migrations.EntityBuilders;
|
|
using SZUAbsolventenverein.Module.PremiumArea.Repository;
|
|
|
|
namespace SZUAbsolventenverein.Module.PremiumArea.Migrations
|
|
{
|
|
[DbContext(typeof(PremiumAreaContext))]
|
|
[Migration("SZUAbsolventenverein.Module.PremiumArea.01.00.00.03")]
|
|
public class AddTitleAndDescription : MultiDatabaseMigration
|
|
{
|
|
public AddTitleAndDescription(IDatabase database) : base(database)
|
|
{
|
|
}
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
var table = new EngineerApplicationEntityBuilder(migrationBuilder, ActiveDatabase);
|
|
table.AddStringColumn("Title", 256, true);
|
|
table.AddMaxStringColumn("ShortDescription", true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
var table = new EngineerApplicationEntityBuilder(migrationBuilder, ActiveDatabase);
|
|
table.DropColumn("Title");
|
|
table.DropColumn("ShortDescription");
|
|
}
|
|
}
|
|
}
|