Project cleanup

This commit is contained in:
SpoinkyNL committed 2018-03-04 22:29:04 +01:00
1 parent 2f72cdb1d9
commit 31affd01b3
30 files changed
+254 -268

No files matched your search

@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace Artemis.Storage.Migrations
{
@@ -9,8 +7,8 @@ namespace Artemis.Storage.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Folders",
columns: table => new
"Folders",
table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -22,28 +20,25 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Folders", x => x.Id);
table.ForeignKey(
name: "FK_Folders_Folders_FolderEntityId",
column: x => x.FolderEntityId,
principalTable: "Folders",
principalColumn: "Id",
"FK_Folders_Folders_FolderEntityId",
x => x.FolderEntityId,
"Folders",
"Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Settings",
columns: table => new
"Settings",
table => new
{
Name = table.Column<string>(nullable: false),
Value = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Settings", x => x.Name);
});
constraints: table => { table.PrimaryKey("PK_Settings", x => x.Name); });
migrationBuilder.CreateTable(
name: "Layers",
columns: table => new
"Layers",
table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -56,16 +51,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Layers", x => x.Id);
table.ForeignKey(
name: "FK_Layers_Folders_FolderEntityId",
column: x => x.FolderEntityId,
principalTable: "Folders",
principalColumn: "Id",
"FK_Layers_Folders_FolderEntityId",
x => x.FolderEntityId,
"Folders",
"Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Profiles",
columns: table => new
"Profiles",
table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -77,16 +72,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Profiles", x => x.Id);
table.ForeignKey(
name: "FK_Profiles_Folders_RootFolderId",
column: x => x.RootFolderId,
principalTable: "Folders",
principalColumn: "Id",
"FK_Profiles_Folders_RootFolderId",
x => x.RootFolderId,
"Folders",
"Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "LayerSettings",
columns: table => new
"LayerSettings",
table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -98,16 +93,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_LayerSettings", x => x.Id);
table.ForeignKey(
name: "FK_LayerSettings_Layers_LayerEntityId",
column: x => x.LayerEntityId,
principalTable: "Layers",
principalColumn: "Id",
"FK_LayerSettings_Layers_LayerEntityId",
x => x.LayerEntityId,
"Layers",
"Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Leds",
columns: table => new
"Leds",
table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -119,16 +114,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Leds", x => x.Id);
table.ForeignKey(
name: "FK_Leds_Layers_LayerId",
column: x => x.LayerId,
principalTable: "Layers",
principalColumn: "Id",
"FK_Leds_Layers_LayerId",
x => x.LayerId,
"Layers",
"Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Keypoints",
columns: table => new
"Keypoints",
table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -140,66 +135,66 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Keypoints", x => x.Id);
table.ForeignKey(
name: "FK_Keypoints_LayerSettings_LayerSettingEntityId",
column: x => x.LayerSettingEntityId,
principalTable: "LayerSettings",
principalColumn: "Id",
"FK_Keypoints_LayerSettings_LayerSettingEntityId",
x => x.LayerSettingEntityId,
"LayerSettings",
"Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_Folders_FolderEntityId",
table: "Folders",
column: "FolderEntityId");
"IX_Folders_FolderEntityId",
"Folders",
"FolderEntityId");
migrationBuilder.CreateIndex(
name: "IX_Keypoints_LayerSettingEntityId",
table: "Keypoints",
column: "LayerSettingEntityId");
"IX_Keypoints_LayerSettingEntityId",
"Keypoints",
"LayerSettingEntityId");
migrationBuilder.CreateIndex(
name: "IX_Layers_FolderEntityId",
table: "Layers",
column: "FolderEntityId");
"IX_Layers_FolderEntityId",
"Layers",
"FolderEntityId");
migrationBuilder.CreateIndex(
name: "IX_LayerSettings_LayerEntityId",
table: "LayerSettings",
column: "LayerEntityId");
"IX_LayerSettings_LayerEntityId",
"LayerSettings",
"LayerEntityId");
migrationBuilder.CreateIndex(
name: "IX_Leds_LayerId",
table: "Leds",
column: "LayerId");
"IX_Leds_LayerId",
"Leds",
"LayerId");
migrationBuilder.CreateIndex(
name: "IX_Profiles_RootFolderId",
table: "Profiles",
column: "RootFolderId");
"IX_Profiles_RootFolderId",
"Profiles",
"RootFolderId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Keypoints");
"Keypoints");
migrationBuilder.DropTable(
name: "Leds");
"Leds");
migrationBuilder.DropTable(
name: "Profiles");
"Profiles");
migrationBuilder.DropTable(
name: "Settings");
"Settings");
migrationBuilder.DropTable(
name: "LayerSettings");
"LayerSettings");
migrationBuilder.DropTable(
name: "Layers");
"Layers");
migrationBuilder.DropTable(
name: "Folders");
"Folders");
}
}
}
}
@@ -1,16 +1,12 @@
// <auto-generated />
using Artemis.Storage;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage;
using System;
namespace Artemis.Storage.Migrations
{
[DbContext(typeof(StorageContext))]
partial class StorageContextModelSnapshot : ModelSnapshot
internal class StorageContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@@ -19,171 +15,171 @@ namespace Artemis.Storage.Migrations
.HasAnnotation("ProductVersion", "2.0.1-rtm-125");
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int?>("FolderEntityId");
b.Property<int?>("FolderEntityId");
b.Property<string>("Name");
b.Property<string>("Name");
b.Property<int>("Order");
b.Property<int>("Order");
b.HasKey("Id");
b.HasKey("Id");
b.HasIndex("FolderEntityId");
b.HasIndex("FolderEntityId");
b.ToTable("Folders");
});
b.ToTable("Folders");
});
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int?>("LayerSettingEntityId");
b.Property<int?>("LayerSettingEntityId");
b.Property<int>("Time");
b.Property<int>("Time");
b.Property<string>("Value");
b.Property<string>("Value");
b.HasKey("Id");
b.HasKey("Id");
b.HasIndex("LayerSettingEntityId");
b.HasIndex("LayerSettingEntityId");
b.ToTable("Keypoints");
});
b.ToTable("Keypoints");
});
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int?>("FolderEntityId");
b.Property<int?>("FolderEntityId");
b.Property<string>("Name");
b.Property<string>("Name");
b.Property<int>("Order");
b.Property<int>("Order");
b.Property<string>("Type");
b.Property<string>("Type");
b.HasKey("Id");
b.HasKey("Id");
b.HasIndex("FolderEntityId");
b.HasIndex("FolderEntityId");
b.ToTable("Layers");
});
b.ToTable("Layers");
});
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int?>("LayerEntityId");
b.Property<int?>("LayerEntityId");
b.Property<string>("Name");
b.Property<string>("Name");
b.Property<string>("Value");
b.Property<string>("Value");
b.HasKey("Id");
b.HasKey("Id");
b.HasIndex("LayerEntityId");
b.HasIndex("LayerEntityId");
b.ToTable("LayerSettings");
});
b.ToTable("LayerSettings");
});
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("LayerId");
b.Property<int>("LayerId");
b.Property<string>("LedName");
b.Property<string>("LedName");
b.Property<string>("LimitedToDevice");
b.Property<string>("LimitedToDevice");
b.HasKey("Id");
b.HasKey("Id");
b.HasIndex("LayerId");
b.HasIndex("LayerId");
b.ToTable("Leds");
});
b.ToTable("Leds");
});
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Module");
b.Property<string>("Module");
b.Property<string>("Name");
b.Property<string>("Name");
b.Property<int>("RootFolderId");
b.Property<int>("RootFolderId");
b.HasKey("Id");
b.HasKey("Id");
b.HasIndex("RootFolderId");
b.HasIndex("RootFolderId");
b.ToTable("Profiles");
});
b.ToTable("Profiles");
});
modelBuilder.Entity("Artemis.Storage.Entities.SettingEntity", b =>
{
b.Property<string>("Name")
.ValueGeneratedOnAdd();
{
b.Property<string>("Name")
.ValueGeneratedOnAdd();
b.Property<string>("Value");
b.Property<string>("Value");
b.HasKey("Name");
b.HasKey("Name");
b.ToTable("Settings");
});
b.ToTable("Settings");
});
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.FolderEntity")
.WithMany("Folders")
.HasForeignKey("FolderEntityId");
});
{
b.HasOne("Artemis.Storage.Entities.FolderEntity")
.WithMany("Folders")
.HasForeignKey("FolderEntityId");
});
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
.WithMany("Keypoints")
.HasForeignKey("LayerSettingEntityId");
});
{
b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
.WithMany("Keypoints")
.HasForeignKey("LayerSettingEntityId");
});
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.FolderEntity")
.WithMany("Layers")
.HasForeignKey("FolderEntityId");
});
{
b.HasOne("Artemis.Storage.Entities.FolderEntity")
.WithMany("Layers")
.HasForeignKey("FolderEntityId");
});
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.LayerEntity")
.WithMany("Settings")
.HasForeignKey("LayerEntityId");
});
{
b.HasOne("Artemis.Storage.Entities.LayerEntity")
.WithMany("Settings")
.HasForeignKey("LayerEntityId");
});
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
.WithMany("Leds")
.HasForeignKey("LayerId")
.OnDelete(DeleteBehavior.Cascade);
});
{
b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
.WithMany("Leds")
.HasForeignKey("LayerId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
.WithMany()
.HasForeignKey("RootFolderId")
.OnDelete(DeleteBehavior.Cascade);
});
{
b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
.WithMany()
.HasForeignKey("RootFolderId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}
}