Skip to content

Commit

Permalink
Readded migrations without token
Browse files Browse the repository at this point in the history
  • Loading branch information
FeroxFoxxo committed Oct 19, 2023
1 parent ef6488d commit d4ed337
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
{
UserId = table.Column<ulong>(type: "bigint unsigned", nullable: false),
GuildId = table.Column<ulong>(type: "bigint unsigned", nullable: false),
Token = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TextXp = table.Column<long>(type: "bigint", nullable: false),
VoiceXp = table.Column<long>(type: "bigint", nullable: false)
},
Expand Down
3 changes: 0 additions & 3 deletions backend/Levels/Migrations/LevelsDatabaseModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<long>("TextXp")
.HasColumnType("bigint");

b.Property<string>("Token")
.HasColumnType("longtext");

b.Property<long>("VoiceXp")
.HasColumnType("bigint");

Expand Down
1 change: 0 additions & 1 deletion backend/Levels/Models/CalculatedGuildUserLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class CalculatedGuildUserLevel : GuildUserLevel

public CalculatedGuildUserLevel(GuildUserLevel guildUserLevel, GuildLevelConfig config = null)
{
Token = guildUserLevel.Token;
UserId = guildUserLevel.UserId;
GuildId = guildUserLevel.GuildId;
TextXp = guildUserLevel.TextXp;
Expand Down
3 changes: 1 addition & 2 deletions backend/Levels/Models/GuildUserLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ namespace Levels.Models;
[PrimaryKey(nameof(GuildId), nameof(UserId))]
public class GuildUserLevel
{
public string Token { get; set; }
public ulong UserId { get; set; }
public ulong GuildId { get; set; }
public long TextXp { get; set; }
public long VoiceXp { get; set; }
public long TotalXp => TextXp + VoiceXp;

protected GuildUserLevel() => Token = "";
protected GuildUserLevel() { }

public GuildUserLevel(IGuildUser guildUser, long textXp = 0, long voiceXp = 0)
{
Expand Down

0 comments on commit d4ed337

Please sign in to comment.