Add migrations for the made models
This commit is contained in:
parent
ca10f50645
commit
5604d0132d
23
ChaosBot/Migrations/20200804195804_LodestoneCharacter.Designer.cs
generated
Normal file
23
ChaosBot/Migrations/20200804195804_LodestoneCharacter.Designer.cs
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804195804_LodestoneCharacter")]
|
||||||
|
partial class LodestoneCharacter
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
ChaosBot/Migrations/20200804195804_LodestoneCharacter.cs
Normal file
32
ChaosBot/Migrations/20200804195804_LodestoneCharacter.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class LodestoneCharacter : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "LodestoneCharacter";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
LodestoneId = table.Column<ulong>(nullable: false),
|
||||||
|
DiscordUserId = table.Column<ulong>(nullable: false),
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
||||||
|
Name = table.Column<string>(nullable: false),
|
||||||
|
Avatar = table.Column<string>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_CharacterAndGuild", x => new {x.DiscordGuildId, x.LodestoneId});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
ChaosBot/Migrations/20200804202834_LodestoneFreeCompany.Designer.cs
generated
Normal file
23
ChaosBot/Migrations/20200804202834_LodestoneFreeCompany.Designer.cs
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804202834_LodestoneFreeCompany")]
|
||||||
|
partial class LodestoneFreeCompany
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
ChaosBot/Migrations/20200804202834_LodestoneFreeCompany.cs
Normal file
30
ChaosBot/Migrations/20200804202834_LodestoneFreeCompany.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class LodestoneFreeCompany : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "LodestoneFreeCompany";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
LodestoneId = table.Column<ulong>(nullable: false),
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
||||||
|
Name = table.Column<string>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_FCAndGuild", x => new {x.DiscordGuildId, x.LodestoneId});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
ChaosBot/Migrations/20200804203214_Points.Designer.cs
generated
Normal file
23
ChaosBot/Migrations/20200804203214_Points.Designer.cs
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804203214_Points")]
|
||||||
|
partial class Points
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
ChaosBot/Migrations/20200804203214_Points.cs
Normal file
30
ChaosBot/Migrations/20200804203214_Points.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class Points : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "Points";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
DiscordUserId = table.Column<ulong>(nullable: false),
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
||||||
|
Amount = table.Column<ulong>(nullable: false, defaultValue: 0)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_UserAndServer", x => new {x.DiscordUserId, x.DiscordGuildId});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
ChaosBot/Migrations/20200804204404_Raffles.Designer.cs
generated
Normal file
23
ChaosBot/Migrations/20200804204404_Raffles.Designer.cs
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804204404_Raffles")]
|
||||||
|
partial class Raffles
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
ChaosBot/Migrations/20200804204404_Raffles.cs
Normal file
32
ChaosBot/Migrations/20200804204404_Raffles.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class Raffles : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "Raffles";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<ulong>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
DiscordUserId = table.Column<ulong>(nullable: false),
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ID", x => x.Id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
ChaosBot/Migrations/20200804204734_CommandPermissions.Designer.cs
generated
Normal file
23
ChaosBot/Migrations/20200804204734_CommandPermissions.Designer.cs
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804204734_CommandPermissions")]
|
||||||
|
partial class CommandPermissions
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
41
ChaosBot/Migrations/20200804204734_CommandPermissions.cs
Normal file
41
ChaosBot/Migrations/20200804204734_CommandPermissions.cs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class CommandPermissions : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "CommandPermissions";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<ulong>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
||||||
|
TargetId = table.Column<ulong>(nullable: false),
|
||||||
|
TargetType = table.Column<PermissionTarget>(nullable: false),
|
||||||
|
Command = table.Column<string>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ID", x => x.Id);
|
||||||
|
table.UniqueConstraint("UK_OneCommandPerTargetOnGuild", x => new {x.DiscordGuildId, x.TargetType, x.TargetId, x.Command});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum PermissionTarget
|
||||||
|
{
|
||||||
|
User,
|
||||||
|
Role
|
||||||
|
}
|
||||||
|
}
|
||||||
23
ChaosBot/Migrations/20200804205955_Configuration.Designer.cs
generated
Normal file
23
ChaosBot/Migrations/20200804205955_Configuration.Designer.cs
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804205955_Configuration")]
|
||||||
|
partial class Configuration
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
ChaosBot/Migrations/20200804205955_Configuration.cs
Normal file
30
ChaosBot/Migrations/20200804205955_Configuration.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class Configuration : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "Configuration";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
||||||
|
Key = table.Column<string>(nullable: false, maxLength: 128),
|
||||||
|
SerializedValue = table.Column<string>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_KeyOnGuild", x => new {x.DiscordGuildId, x.Key});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
139
ChaosBot/Migrations/20200804213001_ExperiencePoints.Designer.cs
generated
Normal file
139
ChaosBot/Migrations/20200804213001_ExperiencePoints.Designer.cs
generated
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
[Migration("20200804213001_ExperiencePoints")]
|
||||||
|
partial class ExperiencePoints
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.CommandPermission", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Command")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("TargetId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<int>("TargetType")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("CommandPermissions");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.Configuration", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Key")
|
||||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
|
b.Property<string>("SerializedValue")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "Key");
|
||||||
|
|
||||||
|
b.ToTable("Configuration");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.LodestoneCharacter", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("LodestoneId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Avatar")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordUserId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "LodestoneId");
|
||||||
|
|
||||||
|
b.ToTable("LodestoneCharacter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.LodestoneFreeCompany", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("LodestoneId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "LodestoneId");
|
||||||
|
|
||||||
|
b.ToTable("LodestoneFreeCompany");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.Point", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordUserId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("Amount")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "DiscordUserId");
|
||||||
|
|
||||||
|
b.ToTable("Points");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.Raffle", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordUserId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Raffles");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
31
ChaosBot/Migrations/20200804213001_ExperiencePoints.cs
Normal file
31
ChaosBot/Migrations/20200804213001_ExperiencePoints.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
public partial class ExperiencePoints : Migration
|
||||||
|
{
|
||||||
|
private const string Table = "ExperiencePoints";
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: Table,
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
||||||
|
DiscordUserId = table.Column<ulong>(nullable: false),
|
||||||
|
Amount = table.Column<ulong>(nullable: false, defaultValue: 0)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_UserAndGuild", x => new {x.DiscordUserId, x.DiscordGuildId});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(Table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
137
ChaosBot/Migrations/ChaosbotContextModelSnapshot.cs
Normal file
137
ChaosBot/Migrations/ChaosbotContextModelSnapshot.cs
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using ChaosBot.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
namespace ChaosBot.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ChaosbotContext))]
|
||||||
|
partial class ChaosbotContextModelSnapshot : ModelSnapshot
|
||||||
|
{
|
||||||
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.6")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.CommandPermission", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Command")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("TargetId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<int>("TargetType")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("CommandPermissions");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.Configuration", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Key")
|
||||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
|
b.Property<string>("SerializedValue")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "Key");
|
||||||
|
|
||||||
|
b.ToTable("Configuration");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.LodestoneCharacter", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("LodestoneId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Avatar")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordUserId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "LodestoneId");
|
||||||
|
|
||||||
|
b.ToTable("LodestoneCharacter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.LodestoneFreeCompany", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("LodestoneId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "LodestoneId");
|
||||||
|
|
||||||
|
b.ToTable("LodestoneFreeCompany");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.Point", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordUserId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("Amount")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.HasKey("DiscordGuildId", "DiscordUserId");
|
||||||
|
|
||||||
|
b.ToTable("Points");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ChaosBot.Models.Raffle", b =>
|
||||||
|
{
|
||||||
|
b.Property<ulong>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordGuildId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.Property<ulong>("DiscordUserId")
|
||||||
|
.HasColumnType("bigint unsigned");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Raffles");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user