Review funktion mit melde funktion ersetzt
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
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.01")]
|
||||
public class AddPremiumTables : MultiDatabaseMigration
|
||||
{
|
||||
public AddPremiumTables(IDatabase database) : base(database)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
var engAppBuilder = new EngineerApplicationEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
engAppBuilder.Create();
|
||||
|
||||
var userPremBuilder = new UserPremiumEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
userPremBuilder.Create();
|
||||
|
||||
var premEventBuilder = new PremiumEventEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
premEventBuilder.Create();
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
var engAppBuilder = new EngineerApplicationEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
engAppBuilder.Drop();
|
||||
|
||||
var userPremBuilder = new UserPremiumEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
userPremBuilder.Drop();
|
||||
|
||||
var premEventBuilder = new PremiumEventEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
premEventBuilder.Drop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
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;
|
||||
using System;
|
||||
|
||||
namespace SZUAbsolventenverein.Module.PremiumArea.Migrations
|
||||
{
|
||||
[DbContext(typeof(PremiumAreaContext))]
|
||||
[Migration("SZUAbsolventenverein.Module.PremiumArea.01.00.00.02")]
|
||||
public class AddReportAndFileColumns : MultiDatabaseMigration
|
||||
{
|
||||
public AddReportAndFileColumns(IDatabase database) : base(database)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// Add FileId (nullable int) - assuming missing
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "FileId",
|
||||
table: "SZUAbsolventenvereinEngineerApplications",
|
||||
nullable: true);
|
||||
|
||||
// Add PdfFileName (string 256)
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PdfFileName",
|
||||
table: "SZUAbsolventenvereinEngineerApplications",
|
||||
maxLength: 256,
|
||||
nullable: true);
|
||||
|
||||
// Add ApprovedOn (DateTime nullable) - might exist but adding if missing?
|
||||
// MigrationBuilder will fail if exists. We assume schema drift needs this.
|
||||
// If it exists, user must handle.
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "ApprovedOn",
|
||||
table: "SZUAbsolventenvereinEngineerApplications",
|
||||
nullable: true);
|
||||
|
||||
// Add IsReported (bool not null default false)
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsReported",
|
||||
table: "SZUAbsolventenvereinEngineerApplications",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
// Add ReportReason (string max nullable)
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ReportReason",
|
||||
table: "SZUAbsolventenvereinEngineerApplications",
|
||||
nullable: true);
|
||||
|
||||
// Add ReportCount (int not null default 0)
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ReportCount",
|
||||
table: "SZUAbsolventenvereinEngineerApplications",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsReported",
|
||||
table: "SZUAbsolventenvereinEngineerApplications");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReportReason",
|
||||
table: "SZUAbsolventenvereinEngineerApplications");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReportCount",
|
||||
table: "SZUAbsolventenvereinEngineerApplications");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileId",
|
||||
table: "SZUAbsolventenvereinEngineerApplications");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PdfFileName",
|
||||
table: "SZUAbsolventenvereinEngineerApplications");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApprovedOn",
|
||||
table: "SZUAbsolventenvereinEngineerApplications");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user