Added plesk module. Implemented create and delete actions
This commit is contained in:
1089
Moonlight/App/Database/Migrations/20230322093852_AddedNameToPleskServer.Designer.cs
generated
Normal file
1089
Moonlight/App/Database/Migrations/20230322093852_AddedNameToPleskServer.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedNameToPleskServer : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "PleskServers",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Name",
|
||||
table: "PleskServers");
|
||||
}
|
||||
}
|
||||
}
|
||||
1073
Moonlight/App/Database/Migrations/20230322094525_SwitchedToPleskModel.Designer.cs
generated
Normal file
1073
Moonlight/App/Database/Migrations/20230322094525_SwitchedToPleskModel.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,124 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SwitchedToPleskModel : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Websites_AaPanels_AaPanelId",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Websites_AaPanelId",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DomainName",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FtpPassword",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FtpUsername",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PhpVersion",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "InternalAaPanelId",
|
||||
table: "Websites",
|
||||
newName: "PleskServerId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "AaPanelId",
|
||||
table: "Websites",
|
||||
newName: "PleskId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Websites_PleskServerId",
|
||||
table: "Websites",
|
||||
column: "PleskServerId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Websites_PleskServers_PleskServerId",
|
||||
table: "Websites",
|
||||
column: "PleskServerId",
|
||||
principalTable: "PleskServers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Websites_PleskServers_PleskServerId",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Websites_PleskServerId",
|
||||
table: "Websites");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PleskServerId",
|
||||
table: "Websites",
|
||||
newName: "InternalAaPanelId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PleskId",
|
||||
table: "Websites",
|
||||
newName: "AaPanelId");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DomainName",
|
||||
table: "Websites",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FtpPassword",
|
||||
table: "Websites",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FtpUsername",
|
||||
table: "Websites",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PhpVersion",
|
||||
table: "Websites",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Websites_AaPanelId",
|
||||
table: "Websites",
|
||||
column: "AaPanelId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Websites_AaPanels_AaPanelId",
|
||||
table: "Websites",
|
||||
column: "AaPanelId",
|
||||
principalTable: "AaPanels",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
1077
Moonlight/App/Database/Migrations/20230323084631_AddedBaseDomainToWebsite.Designer.cs
generated
Normal file
1077
Moonlight/App/Database/Migrations/20230323084631_AddedBaseDomainToWebsite.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedBaseDomainToWebsite : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BaseDomain",
|
||||
table: "Websites",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BaseDomain",
|
||||
table: "Websites");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -460,6 +460,10 @@ namespace Moonlight.App.Database.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PleskServers");
|
||||
@@ -814,37 +818,25 @@ namespace Moonlight.App.Database.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("AaPanelId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("DomainName")
|
||||
b.Property<string>("BaseDomain")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("FtpPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("FtpUsername")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("InternalAaPanelId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("OwnerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PhpVersion")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
b.Property<int>("PleskId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("PleskServerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AaPanelId");
|
||||
|
||||
b.HasIndex("OwnerId");
|
||||
|
||||
b.HasIndex("PleskServerId");
|
||||
|
||||
b.ToTable("Websites");
|
||||
});
|
||||
|
||||
@@ -1034,21 +1026,21 @@ namespace Moonlight.App.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Website", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.AaPanel", "AaPanel")
|
||||
.WithMany()
|
||||
.HasForeignKey("AaPanelId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("AaPanel");
|
||||
b.HasOne("Moonlight.App.Database.Entities.PleskServer", "PleskServer")
|
||||
.WithMany()
|
||||
.HasForeignKey("PleskServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Owner");
|
||||
|
||||
b.Navigation("PleskServer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Image", b =>
|
||||
|
||||
Reference in New Issue
Block a user