mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Removed seperate plugins project since you're always referencing both..
Added more loading logic
This commit is contained in:
1 parent
3db4aab8bc
commit
c22a78cd30
57 files changed
+959
-650
No files matched your search
@@ -0,0 +1,200 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Folders",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
FolderEntityGuid = table.Column<string>(nullable: true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Order = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Folders", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_Folders_Folders_FolderEntityGuid",
|
||||
column: x => x.FolderEntityGuid,
|
||||
principalTable: "Folders",
|
||||
principalColumn: "Guid",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Settings",
|
||||
columns: table => new
|
||||
{
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Value = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Settings", x => x.Name);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Layers",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
FolderEntityGuid = table.Column<string>(nullable: true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Order = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Layers", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_Layers_Folders_FolderEntityGuid",
|
||||
column: x => x.FolderEntityGuid,
|
||||
principalTable: "Folders",
|
||||
principalColumn: "Guid",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Profiles",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
PluginGuid = table.Column<Guid>(nullable: false),
|
||||
RootFolderGuid = table.Column<string>(nullable: true),
|
||||
RootFolderId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Profiles", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_Profiles_Folders_RootFolderGuid",
|
||||
column: x => x.RootFolderGuid,
|
||||
principalTable: "Folders",
|
||||
principalColumn: "Guid",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LayerSettings",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
LayerEntityGuid = table.Column<string>(nullable: true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Value = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LayerSettings", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_LayerSettings_Layers_LayerEntityGuid",
|
||||
column: x => x.LayerEntityGuid,
|
||||
principalTable: "Layers",
|
||||
principalColumn: "Guid",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Leds",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
LayerGuid = table.Column<string>(nullable: true),
|
||||
LayerId = table.Column<int>(nullable: false),
|
||||
LedName = table.Column<string>(nullable: true),
|
||||
LimitedToDevice = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Leds", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_Leds_Layers_LayerGuid",
|
||||
column: x => x.LayerGuid,
|
||||
principalTable: "Layers",
|
||||
principalColumn: "Guid",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Keypoints",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
LayerSettingEntityGuid = table.Column<string>(nullable: true),
|
||||
Time = table.Column<int>(nullable: false),
|
||||
Value = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Keypoints", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_Keypoints_LayerSettings_LayerSettingEntityGuid",
|
||||
column: x => x.LayerSettingEntityGuid,
|
||||
principalTable: "LayerSettings",
|
||||
principalColumn: "Guid",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Folders_FolderEntityGuid",
|
||||
table: "Folders",
|
||||
column: "FolderEntityGuid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Keypoints_LayerSettingEntityGuid",
|
||||
table: "Keypoints",
|
||||
column: "LayerSettingEntityGuid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Layers_FolderEntityGuid",
|
||||
table: "Layers",
|
||||
column: "FolderEntityGuid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LayerSettings_LayerEntityGuid",
|
||||
table: "LayerSettings",
|
||||
column: "LayerEntityGuid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Leds_LayerGuid",
|
||||
table: "Leds",
|
||||
column: "LayerGuid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Profiles_RootFolderGuid",
|
||||
table: "Profiles",
|
||||
column: "RootFolderGuid");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Keypoints");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Leds");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Profiles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Settings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "LayerSettings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Layers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Folders");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user