Skip to content

Commit

Permalink
Merge pull request #768 from planetarium/feature/custom-equipment-craft
Browse files Browse the repository at this point in the history
Feature/custom equipment craft
  • Loading branch information
U-lis authored Sep 13, 2024
2 parents 074f8b8 + 6fed163 commit d5d2fbb
Show file tree
Hide file tree
Showing 19 changed files with 9,544 additions and 14 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace NineChronicles.DataProvider.Executable.Migrations
{
public partial class AddCustomEquipmentCraft : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CustomEquipmentCraft",
columns: table => new
{
Id = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
BlockIndex = table.Column<long>(type: "bigint", nullable: false),
AvatarAddress = table.Column<string>(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EquipmentItemId = table.Column<int>(type: "int", nullable: false),
RecipeId = table.Column<int>(type: "int", nullable: false),
SlotIndex = table.Column<int>(type: "int", nullable: false),
ItemSubType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IconId = table.Column<int>(type: "int", nullable: false),
ElementalType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
DrawingAmount = table.Column<int>(type: "int", nullable: false),
DrawingToolAmount = table.Column<int>(type: "int", nullable: false),
NcgCost = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
AdditionalCost = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Date = table.Column<DateOnly>(type: "date", nullable: false),
TimeStamp = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomEquipmentCraft", x => x.Id);
table.ForeignKey(
name: "FK_CustomEquipmentCraft_Avatars_AvatarAddress",
column: x => x.AvatarAddress,
principalTable: "Avatars",
principalColumn: "Address");
})
.Annotation("MySql:CharSet", "utf8mb4");

migrationBuilder.CreateTable(
name: "CustomEquipmentCraftCount",
columns: table => new
{
IconId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ItemSubType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Count = table.Column<long>(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomEquipmentCraftCount", x => x.IconId);
})
.Annotation("MySql:CharSet", "utf8mb4");

migrationBuilder.CreateIndex(
name: "IX_CustomEquipmentCraft_AvatarAddress",
table: "CustomEquipmentCraft",
column: "AvatarAddress");
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CustomEquipmentCraft");

migrationBuilder.DropTable(
name: "CustomEquipmentCraftCount");
}
}
}
Loading

0 comments on commit d5d2fbb

Please sign in to comment.