mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add documents by machine family.
This commit is contained in:
@@ -9,8 +9,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(cicmContext))]
|
||||
[Migration("20190616235255_AddDocumentssByMachine")]
|
||||
partial class AddDocumentssByMachine
|
||||
[Migration("20190616235255_AddDocumentsByMachine")]
|
||||
partial class AddDocumentsByMachine
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class AddDocumentssByMachine : Migration
|
||||
public partial class AddDocumentsByMachine : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
7731
Cicm.Database/Migrations/20190617010136_AddDocumentsByMachineFamily.Designer.cs
generated
Normal file
7731
Cicm.Database/Migrations/20190617010136_AddDocumentsByMachineFamily.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class AddDocumentsByMachineFamily : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("DocumentsByMachineFamily",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<long>()
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DocumentId = table.Column<long>(),
|
||||
MachineFamilyId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DocumentsByMachineFamily", x => x.Id);
|
||||
table.ForeignKey("FK_DocumentsByMachineFamily_Documents_DocumentId",
|
||||
x => x.DocumentId, "Documents", "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table
|
||||
.ForeignKey("FK_DocumentsByMachineFamily_machine_families_MachineFamilyId",
|
||||
x => x.MachineFamilyId, "machine_families", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("IX_DocumentsByMachineFamily_DocumentId", "DocumentsByMachineFamily",
|
||||
"DocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex("IX_DocumentsByMachineFamily_MachineFamilyId", "DocumentsByMachineFamily",
|
||||
"MachineFamilyId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("DocumentsByMachineFamily");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -598,6 +598,23 @@ namespace Cicm.Database.Migrations
|
||||
b.ToTable("DocumentsByMachines");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.DocumentsByMachineFamily", b =>
|
||||
{
|
||||
b.Property<long>("Id").ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("DocumentId");
|
||||
|
||||
b.Property<int>("MachineFamilyId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.HasIndex("MachineFamilyId");
|
||||
|
||||
b.ToTable("DocumentsByMachineFamily");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.Forbidden", b =>
|
||||
{
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
||||
@@ -5338,6 +5355,15 @@ namespace Cicm.Database.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.DocumentsByMachineFamily", b =>
|
||||
{
|
||||
b.HasOne("Cicm.Database.Models.Document", "Document").WithMany("MachineFamilies")
|
||||
.HasForeignKey("DocumentId").OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("Cicm.Database.Models.MachineFamily", "MachineFamily").WithMany("Documents")
|
||||
.HasForeignKey("MachineFamilyId").OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.Gpu",
|
||||
b =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user