mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Project cleanup
This commit is contained in:
1 parent
529e52b35d
commit
ab3f2b1fd8
27 files changed
+387
-141
No files matched your search
@@ -15,4 +15,4 @@ namespace Artemis.Storage.Entities
|
||||
internal enum LayerType
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,8 @@ namespace Artemis.Storage.Entities
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public virtual ICollection<Layer> Layers { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ namespace Artemis.Storage.Entities
|
||||
{
|
||||
[Key]
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
@@ -9,45 +7,39 @@ namespace Artemis.Storage.Migrations
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Profiles",
|
||||
columns: table => new
|
||||
"Profiles",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Profiles", x => x.Id);
|
||||
});
|
||||
constraints: table => { table.PrimaryKey("PK_Profiles", x => x.Id); });
|
||||
|
||||
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: "Layer",
|
||||
columns: table => new
|
||||
"Layer",
|
||||
table => new
|
||||
{
|
||||
ProfileId = table.Column<int>(nullable: false),
|
||||
Name = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Layer", x => new { x.ProfileId, x.Name });
|
||||
table.PrimaryKey("PK_Layer", x => new {x.ProfileId, x.Name});
|
||||
table.ForeignKey(
|
||||
name: "FK_Layer_Profiles_ProfileId",
|
||||
column: x => x.ProfileId,
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id",
|
||||
"FK_Layer_Profiles_ProfileId",
|
||||
x => x.ProfileId,
|
||||
"Profiles",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
}
|
||||
@@ -55,13 +47,13 @@ namespace Artemis.Storage.Migrations
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Layer");
|
||||
"Layer");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Settings");
|
||||
"Settings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Profiles");
|
||||
"Profiles");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,48 +15,48 @@ namespace Artemis.Storage.Migrations
|
||||
.HasAnnotation("ProductVersion", "2.0.1-rtm-125");
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.Layer", b =>
|
||||
{
|
||||
b.Property<int>("ProfileId");
|
||||
{
|
||||
b.Property<int>("ProfileId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("ProfileId", "Name");
|
||||
b.HasKey("ProfileId", "Name");
|
||||
|
||||
b.ToTable("Layer");
|
||||
});
|
||||
b.ToTable("Layer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.Profile", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Profiles");
|
||||
});
|
||||
b.ToTable("Profiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.Setting", 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.Layer", b =>
|
||||
{
|
||||
b.HasOne("Artemis.Storage.Entities.Profile", "Profile")
|
||||
.WithMany("Layers")
|
||||
.HasForeignKey("ProfileId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
{
|
||||
b.HasOne("Artemis.Storage.Entities.Profile", "Profile")
|
||||
.WithMany("Layers")
|
||||
.HasForeignKey("ProfileId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,4 +25,4 @@ namespace Artemis.Storage
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user