Creation of EF Core Migrations - these execute using EF Tools, but are not integrated to run programmatically
This commit is contained in:
26
Oqtane.Server/Migrations/02000102_AddLanguageTable.cs
Normal file
26
Oqtane.Server/Migrations/02000102_AddLanguageTable.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Oqtane.Migrations.EntityBuilders;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Migrations
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
[Migration("Tenant.02.00.01.02")]
|
||||
public class AddLanguageTable : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
//Create Language table
|
||||
var languageEntityBuilder = new LanguageEntityBuilder(migrationBuilder);
|
||||
languageEntityBuilder.Create();
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
//Drop Language table
|
||||
var languageEntityBuilder = new LanguageEntityBuilder(migrationBuilder);
|
||||
languageEntityBuilder.Drop();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user