forked from ddrilling/AsbCloudServer
Fix migrations
This commit is contained in:
parent
9764809c3a
commit
805bb4f3ae
File diff suppressed because it is too large
Load Diff
@ -1,87 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class AddDeillerModel : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "caption",
|
|
||||||
table: "t_well_type",
|
|
||||||
type: "character varying(255)",
|
|
||||||
maxLength: 255,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
comment: "Название",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(255)",
|
|
||||||
oldMaxLength: 255,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Название");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "caption",
|
|
||||||
table: "t_well_section_type",
|
|
||||||
type: "character varying(255)",
|
|
||||||
maxLength: 255,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
comment: "Название",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(255)",
|
|
||||||
oldMaxLength: 255,
|
|
||||||
oldNullable: true,
|
|
||||||
oldComment: "Название");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "t_driller",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Имя"),
|
|
||||||
surname = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Фамилия"),
|
|
||||||
patronymic = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Отчество")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_t_driller", x => x.id);
|
|
||||||
},
|
|
||||||
comment: "Бурильщик");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "t_driller");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "caption",
|
|
||||||
table: "t_well_type",
|
|
||||||
type: "character varying(255)",
|
|
||||||
maxLength: 255,
|
|
||||||
nullable: true,
|
|
||||||
comment: "Название",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(255)",
|
|
||||||
oldMaxLength: 255,
|
|
||||||
oldComment: "Название");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "caption",
|
|
||||||
table: "t_well_section_type",
|
|
||||||
type: "character varying(255)",
|
|
||||||
maxLength: 255,
|
|
||||||
nullable: true,
|
|
||||||
comment: "Название",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(255)",
|
|
||||||
oldMaxLength: 255,
|
|
||||||
oldComment: "Название");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
5808
AsbCloudDb/Migrations/20220522083739_AddSchedule.Designer.cs
generated
5808
AsbCloudDb/Migrations/20220522083739_AddSchedule.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class AddSchedule : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class ChangeDateSchedule : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class AddSchedule1 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "t_schedule",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
id_driller = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор бурильщика"),
|
|
||||||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор скважины"),
|
|
||||||
shift_start = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "Начало смены"),
|
|
||||||
shift_end = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "Конец смены"),
|
|
||||||
drill_start = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "Начало бурение"),
|
|
||||||
drill_end = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "Конец бурения")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_t_schedule", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_t_schedule_t_driller_id_driller",
|
|
||||||
column: x => x.id_driller,
|
|
||||||
principalTable: "t_driller",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_t_schedule_t_well_id_well",
|
|
||||||
column: x => x.id_well,
|
|
||||||
principalTable: "t_well",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
},
|
|
||||||
comment: "График работы бурильщика");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_t_schedule_id_driller",
|
|
||||||
table: "t_schedule",
|
|
||||||
column: "id_driller");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_t_schedule_id_well",
|
|
||||||
table: "t_schedule",
|
|
||||||
column: "id_well");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "t_schedule");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class AddInvertLink : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
5884
AsbCloudDb/Migrations/20220525130143_ChangeModel.Designer.cs
generated
5884
AsbCloudDb/Migrations/20220525130143_ChangeModel.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class ChangeModel : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,39 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Migrations
|
|
||||||
{
|
|
||||||
public partial class ChangeModel2 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_t_schedule_t_driller_id_driller",
|
|
||||||
table: "t_schedule");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "t_schedule_t_driller_id_driller",
|
|
||||||
table: "t_schedule",
|
|
||||||
column: "id_driller",
|
|
||||||
principalTable: "t_driller",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "t_schedule_t_driller_id_driller",
|
|
||||||
table: "t_schedule");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_t_schedule_t_driller_id_driller",
|
|
||||||
table: "t_schedule",
|
|
||||||
column: "id_driller",
|
|
||||||
principalTable: "t_driller",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user