forked from xiongyuxing/tiku-backend.net
19 lines
712 B
C#
19 lines
712 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Tiku.Infrastructure.Persistence.Migrations;
|
|
|
|
internal static class MigrationBuilderTenantGuardExtensions
|
|
{
|
|
public static void EnsureTenantIsolationGuards(this MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql(PostgreSqlTenantConstraintSql.DropTenantGuards);
|
|
migrationBuilder.Sql(PostgreSqlTenantConstraintSql.CreateTenantQuestionReferenceGuard);
|
|
migrationBuilder.Sql(PostgreSqlTenantConstraintSql.CreateTaxonomyParentGuard);
|
|
}
|
|
|
|
public static void DropTenantIsolationGuards(this MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql(PostgreSqlTenantConstraintSql.DropTenantGuards);
|
|
}
|
|
}
|