From c2d56fce5af99542a978f67a66f1215cdb3cfea2 Mon Sep 17 00:00:00 2001 From: Mika Aaron Herrmann <65243124+MH321Productions@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:36:50 +0100 Subject: [PATCH] Consumer API: Make File's Owner and OwnerSignature required (#503) * Change Base64 strings to byte arrays in DTO * Make non-null fields required in data classes * Add PropertyGroup Nullable to File projects * Remove call to deleted script * Make Owner and OwnerSignature required, validate it correctly * Make DeletedBy null in response * Add DB migration to make Owner property non-null with default value of "" * Fix Schroedinger's Whitespace (File was not completely CRLF) * Make OwnerSignature, CipherHash and EncryptedProperties base64 strings again * Remove trailing whitespace --- .../Files.Application.csproj | 6 +- .../Commands/CreateFile/CreateFileCommand.cs | 12 +- .../CreateFile/CreateFileCommandValidator.cs | 6 +- .../Commands/CreateFile/CreateFileResponse.cs | 24 ++-- .../Files/Commands/CreateFile/Handler.cs | 2 +- .../Controllers/FilesController.cs | 2 +- .../Files.ConsumerApi/DTOs/CreateFileDTO.cs | 12 +- .../Files/src/Files.Domain/Entities/File.cs | 2 +- ...tOwnerRequiredWithDefaultValue.Designer.cs | 119 ++++++++++++++++++ ...085123_SetOwnerRequiredWithDefaultValue.cs | 48 +++++++ .../Migrations/FilesDbContextModelSnapshot.cs | 3 +- ...tOwnerRequiredWithDefaultValue.Designer.cs | 119 ++++++++++++++++++ ...085113_SetOwnerRequiredWithDefaultValue.cs | 48 +++++++ .../ApplicationDbContextModelSnapshot.cs | 3 +- .../Files.Infrastructure.csproj | 6 +- .../Files.Jobs.SanityCheck.csproj | 3 +- scripts/windows/efcore/remove_migration.ps1 | 4 +- 17 files changed, 380 insertions(+), 39 deletions(-) create mode 100644 Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.Designer.cs create mode 100644 Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.cs create mode 100644 Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.Designer.cs create mode 100644 Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.cs diff --git a/Modules/Files/src/Files.Application/Files.Application.csproj b/Modules/Files/src/Files.Application/Files.Application.csproj index ed5984325e..8f15340df4 100644 --- a/Modules/Files/src/Files.Application/Files.Application.csproj +++ b/Modules/Files/src/Files.Application/Files.Application.csproj @@ -1,4 +1,8 @@ - + + + + enable + diff --git a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommand.cs b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommand.cs index 1b5ee6e3c4..d0aba98f56 100644 --- a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommand.cs +++ b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommand.cs @@ -7,14 +7,14 @@ namespace Backbone.Modules.Files.Application.Files.Commands.CreateFile; [ApplyQuotasForMetrics("NumberOfFiles", "UsedFileStorageSpace")] public class CreateFileCommand : IRequest { - public byte[] FileContent { get; set; } + public required byte[] FileContent { get; set; } - public IdentityAddress Owner { get; set; } - public byte[] OwnerSignature { get; set; } + public required IdentityAddress Owner { get; set; } + public required byte[] OwnerSignature { get; set; } - public byte[] CipherHash { get; set; } + public required byte[] CipherHash { get; set; } - public DateTime ExpiresAt { get; set; } + public required DateTime ExpiresAt { get; set; } - public byte[] EncryptedProperties { get; set; } + public required byte[] EncryptedProperties { get; set; } } diff --git a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommandValidator.cs b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommandValidator.cs index 2d54071dee..f38e40897f 100644 --- a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommandValidator.cs +++ b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileCommandValidator.cs @@ -23,12 +23,10 @@ public CreateFileCommandValidator() .GreaterThan(SystemTime.UtcNow).WithMessage("'{PropertyName}' must be in the future.").WithErrorCode(GenericApplicationErrors.Validation.InvalidPropertyValue().Code); RuleFor(m => m.Owner) - .NotEmpty() - .When(m => m.OwnerSignature is { Length: > 0 }) - .WithMessage(m => $"{nameof(m.Owner)} and {nameof(m.OwnerSignature)} have to be provided either both or none."); + .DetailedNotEmpty(); RuleFor(m => m.OwnerSignature) - .NumberOfBytes(0, 512); + .NumberOfBytes(1, 512); RuleFor(r => r.EncryptedProperties) .NumberOfBytes(0, 1.Mebibytes()); diff --git a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileResponse.cs b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileResponse.cs index c30091cdab..a3e4a6acb9 100644 --- a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileResponse.cs +++ b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/CreateFileResponse.cs @@ -8,24 +8,24 @@ namespace Backbone.Modules.Files.Application.Files.Commands.CreateFile; public class CreateFileResponse : IHaveCustomMapping { - public FileId Id { get; set; } + public required FileId Id { get; set; } - public DateTime CreatedAt { get; set; } - public IdentityAddress CreatedBy { get; set; } - public DeviceId CreatedByDevice { get; set; } + public required DateTime CreatedAt { get; set; } + public required IdentityAddress CreatedBy { get; set; } + public required DeviceId CreatedByDevice { get; set; } - public DateTime ModifiedAt { get; set; } - public IdentityAddress ModifiedBy { get; set; } + public required DateTime ModifiedAt { get; set; } + public required IdentityAddress ModifiedBy { get; set; } public DateTime? DeletedAt { get; set; } - public IdentityAddress DeletedBy { get; set; } + public IdentityAddress? DeletedBy { get; set; } - public IdentityAddress Owner { get; set; } - public byte[] OwnerSignature { get; set; } + public required IdentityAddress Owner { get; set; } + public required byte[] OwnerSignature { get; set; } - public long CipherSize { get; set; } - public byte[] CipherHash { get; set; } + public required long CipherSize { get; set; } + public required byte[] CipherHash { get; set; } - public DateTime ExpiresAt { get; set; } + public required DateTime ExpiresAt { get; set; } public void CreateMappings(Profile configuration) { diff --git a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/Handler.cs b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/Handler.cs index 0676122430..bb0112caed 100644 --- a/Modules/Files/src/Files.Application/Files/Commands/CreateFile/Handler.cs +++ b/Modules/Files/src/Files.Application/Files/Commands/CreateFile/Handler.cs @@ -29,7 +29,7 @@ public async Task Handle(CreateFileCommand request, Cancella _userContext.GetAddress(), _userContext.GetDeviceId(), request.Owner, - request.OwnerSignature ?? Array.Empty(), + request.OwnerSignature, request.CipherHash, request.FileContent, request.FileContent.LongLength, diff --git a/Modules/Files/src/Files.ConsumerApi/Controllers/FilesController.cs b/Modules/Files/src/Files.ConsumerApi/Controllers/FilesController.cs index 2eebd184c0..d75a99561c 100644 --- a/Modules/Files/src/Files.ConsumerApi/Controllers/FilesController.cs +++ b/Modules/Files/src/Files.ConsumerApi/Controllers/FilesController.cs @@ -49,7 +49,7 @@ public async Task UploadFile([FromForm] CreateFileDTO dto, Cancel ExpiresAt = dto.ExpiresAt, CipherHash = UrlBase64.Decode(dto.CipherHash), Owner = dto.Owner, - OwnerSignature = dto.OwnerSignature == null ? null : UrlBase64.Decode(dto.OwnerSignature), + OwnerSignature = UrlBase64.Decode(dto.OwnerSignature), EncryptedProperties = UrlBase64.Decode(dto.EncryptedProperties) }; diff --git a/Modules/Files/src/Files.ConsumerApi/DTOs/CreateFileDTO.cs b/Modules/Files/src/Files.ConsumerApi/DTOs/CreateFileDTO.cs index a837d5ec0b..6c39b6c948 100644 --- a/Modules/Files/src/Files.ConsumerApi/DTOs/CreateFileDTO.cs +++ b/Modules/Files/src/Files.ConsumerApi/DTOs/CreateFileDTO.cs @@ -5,13 +5,13 @@ namespace Backbone.Modules.Files.ConsumerApi.DTOs; public class CreateFileDTO { - public IFormFile Content { get; set; } - public IdentityAddress? Owner { get; set; } - public string? OwnerSignature { get; set; } + public required IFormFile Content { get; set; } + public required IdentityAddress Owner { get; set; } + public required string OwnerSignature { get; set; } - public string CipherHash { get; set; } + public required string CipherHash { get; set; } - public DateTime ExpiresAt { get; set; } + public required DateTime ExpiresAt { get; set; } - public string EncryptedProperties { get; set; } + public required string EncryptedProperties { get; set; } } diff --git a/Modules/Files/src/Files.Domain/Entities/File.cs b/Modules/Files/src/Files.Domain/Entities/File.cs index d1becab3cd..e10bd9f454 100644 --- a/Modules/Files/src/Files.Domain/Entities/File.cs +++ b/Modules/Files/src/Files.Domain/Entities/File.cs @@ -45,7 +45,7 @@ public File(IdentityAddress createdBy, DeviceId createdByDevice, IdentityAddress public IdentityAddress? DeletedBy { get; set; } public DeviceId? DeletedByDevice { get; set; } - public IdentityAddress? Owner { get; set; } + public IdentityAddress Owner { get; set; } public byte[] OwnerSignature { get; set; } public long CipherSize { get; set; } diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.Designer.cs b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.Designer.cs new file mode 100644 index 0000000000..ba4eb69af3 --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.Designer.cs @@ -0,0 +1,119 @@ +// +using System; +using Backbone.Modules.Files.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(FilesDbContext))] + [Migration("20240124085123_SetOwnerRequiredWithDefaultValue")] + partial class SetOwnerRequiredWithDefaultValue + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Files.Domain.Entities.File", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CipherHash") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("CipherSize") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedBy") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("EncryptedProperties") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("ModifiedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("OwnerSignature") + .IsRequired() + .HasColumnType("bytea"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.ToTable("FileMetadata", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.cs b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.cs new file mode 100644 index 0000000000..c7341625a3 --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240124085123_SetOwnerRequiredWithDefaultValue.cs @@ -0,0 +1,48 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class SetOwnerRequiredWithDefaultValue : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Owner", + table: "FileMetadata", + type: "character(36)", + unicode: false, + fixedLength: true, + maxLength: 36, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character(36)", + oldUnicode: false, + oldFixedLength: true, + oldMaxLength: 36, + oldNullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Owner", + table: "FileMetadata", + type: "character(36)", + unicode: false, + fixedLength: true, + maxLength: 36, + nullable: true, + oldClrType: typeof(string), + oldType: "character(36)", + oldUnicode: false, + oldFixedLength: true, + oldMaxLength: 36); + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs index 96d3b93b4d..0414220c96 100644 --- a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.5") + .HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -94,6 +94,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsFixedLength(); b.Property("Owner") + .IsRequired() .HasMaxLength(36) .IsUnicode(false) .HasColumnType("character(36)") diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.Designer.cs b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.Designer.cs new file mode 100644 index 0000000000..b626158407 --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.Designer.cs @@ -0,0 +1,119 @@ +// +using System; +using Backbone.Modules.Files.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(FilesDbContext))] + [Migration("20240124085113_SetOwnerRequiredWithDefaultValue")] + partial class SetOwnerRequiredWithDefaultValue + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Files.Domain.Entities.File", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CipherHash") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("CipherSize") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("datetime2"); + + b.Property("DeletedBy") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("EncryptedProperties") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("ModifiedAt") + .HasColumnType("datetime2"); + + b.Property("ModifiedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("ModifiedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("OwnerSignature") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.ToTable("FileMetadata", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.cs b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.cs new file mode 100644 index 0000000000..359e58fb8e --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240124085113_SetOwnerRequiredWithDefaultValue.cs @@ -0,0 +1,48 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class SetOwnerRequiredWithDefaultValue : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Owner", + table: "FileMetadata", + type: "char(36)", + unicode: false, + fixedLength: true, + maxLength: 36, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "char(36)", + oldUnicode: false, + oldFixedLength: true, + oldMaxLength: 36, + oldNullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Owner", + table: "FileMetadata", + type: "char(36)", + unicode: false, + fixedLength: true, + maxLength: 36, + nullable: true, + oldClrType: typeof(string), + oldType: "char(36)", + oldUnicode: false, + oldFixedLength: true, + oldMaxLength: 36); + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index ec52e018e8..524756fc17 100644 --- a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.5") + .HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -94,6 +94,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsFixedLength(); b.Property("Owner") + .IsRequired() .HasMaxLength(36) .IsUnicode(false) .HasColumnType("char(36)") diff --git a/Modules/Files/src/Files.Infrastructure/Files.Infrastructure.csproj b/Modules/Files/src/Files.Infrastructure/Files.Infrastructure.csproj index e56d383e9c..b535e7f37d 100644 --- a/Modules/Files/src/Files.Infrastructure/Files.Infrastructure.csproj +++ b/Modules/Files/src/Files.Infrastructure/Files.Infrastructure.csproj @@ -1,4 +1,8 @@ - + + + + enable + diff --git a/Modules/Files/src/Files.Jobs.SanityCheck/Files.Jobs.SanityCheck.csproj b/Modules/Files/src/Files.Jobs.SanityCheck/Files.Jobs.SanityCheck.csproj index 33595d26b7..a338edbbc7 100644 --- a/Modules/Files/src/Files.Jobs.SanityCheck/Files.Jobs.SanityCheck.csproj +++ b/Modules/Files/src/Files.Jobs.SanityCheck/Files.Jobs.SanityCheck.csproj @@ -1,9 +1,10 @@ - + dotnet-Files.Jobs.SanityCheck-9f22e8e4-eb64-498c-9599-b971e0419647 Linux ..\..\..\.. + enable diff --git a/scripts/windows/efcore/remove_migration.ps1 b/scripts/windows/efcore/remove_migration.ps1 index 796fd8be46..2723184bba 100644 --- a/scripts/windows/efcore/remove_migration.ps1 +++ b/scripts/windows/efcore/remove_migration.ps1 @@ -33,8 +33,6 @@ function RemoveMigration { Write-Host "Executing '$cmd'..." Invoke-Expression $cmd - - & $PSScriptRoot/compile_models.ps1 $moduleName $provider } switch ($provider) { @@ -44,4 +42,4 @@ switch ($provider) { RemoveMigration "SqlServer" RemoveMigration "Postgres" } -} \ No newline at end of file +}