forked from ddrilling/AsbCloudServer
Add migration
This commit is contained in:
parent
c568fafa8f
commit
4791ab6db1
@ -1,11 +1,6 @@
|
|||||||
using System;
|
namespace AsbCloudApp.Data
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AsbCloudApp.Data
|
|
||||||
{
|
{
|
||||||
|
#nullable enable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Описание данных для бурильщика
|
/// Описание данных для бурильщика
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -15,17 +10,21 @@ namespace AsbCloudApp.Data
|
|||||||
/// Идентификатор в БД
|
/// Идентификатор в БД
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Имя
|
/// Имя
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Фамилия
|
/// Фамилия
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Surname { get; set; }
|
public string Surname { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Отчество
|
/// Отчество
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Patronymic { get; set; }
|
public string? Patronymic { get; set; }
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
}
|
}
|
||||||
|
5883
AsbCloudDb/Migrations/20220531113336_Make_Driller_patronimic_nullable.Designer.cs
generated
Normal file
5883
AsbCloudDb/Migrations/20220531113336_Make_Driller_patronimic_nullable.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Migrations
|
||||||
|
{
|
||||||
|
public partial class Make_Driller_patronimic_nullable : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "patronymic",
|
||||||
|
table: "t_driller",
|
||||||
|
type: "character varying(255)",
|
||||||
|
maxLength: 255,
|
||||||
|
nullable: true,
|
||||||
|
comment: "Отчество",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(255)",
|
||||||
|
oldMaxLength: 255,
|
||||||
|
oldComment: "Отчество");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "patronymic",
|
||||||
|
table: "t_driller",
|
||||||
|
type: "character varying(255)",
|
||||||
|
maxLength: 255,
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "",
|
||||||
|
comment: "Отчество",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(255)",
|
||||||
|
oldMaxLength: 255,
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Отчество");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -268,7 +268,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Имя");
|
.HasComment("Имя");
|
||||||
|
|
||||||
b.Property<string>("Patronymic")
|
b.Property<string>("Patronymic")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(255)
|
.HasMaxLength(255)
|
||||||
.HasColumnType("character varying(255)")
|
.HasColumnType("character varying(255)")
|
||||||
.HasColumnName("patronymic")
|
.HasColumnName("patronymic")
|
||||||
|
@ -23,7 +23,7 @@ namespace AsbCloudDb.Model
|
|||||||
|
|
||||||
[Column("patronymic"), Comment("Отчество")]
|
[Column("patronymic"), Comment("Отчество")]
|
||||||
[StringLength(255)]
|
[StringLength(255)]
|
||||||
public string Patronymic { get; set; } = null!;
|
public string? Patronymic { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[InverseProperty(nameof(Model.Schedule.Driller))]
|
[InverseProperty(nameof(Model.Schedule.Driller))]
|
||||||
|
Loading…
Reference in New Issue
Block a user