Set defaults for some other booleans.

This commit is contained in:
2020-06-09 22:17:05 +01:00
parent 1487206523
commit af07f790fd
3 changed files with 4132 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Marechai.Database.Migrations
{
public partial class SetDefaultsForBooleans : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<bool>("SerialNumberVisible", "OwnedMachines", nullable: false,
defaultValue: true, oldClrType: typeof(bool), oldType: "bit(1)",
oldDefaultValue: 1ul);
migrationBuilder.AlterColumn<bool>("Enabled", "DocumentRoles", nullable: false, defaultValue: true,
oldClrType: typeof(bool), oldType: "bit(1)", oldDefaultValue: 1ul);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<bool>("SerialNumberVisible", "OwnedMachines", "bit(1)", nullable: false,
defaultValue: 1ul, oldClrType: typeof(bool), oldDefaultValue: true);
migrationBuilder.AlterColumn<bool>("Enabled", "DocumentRoles", "bit(1)", nullable: false, defaultValue: 1ul,
oldClrType: typeof(bool), oldDefaultValue: true);
}
}
}

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>4.0.0.1580</Version>
<Version>4.0.0.1585</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>