mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace West.TelegramBot.Reputation.Migrations
|
|
{
|
|
public partial class Initial : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterDatabase()
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "UserReputation",
|
|
columns: table => new
|
|
{
|
|
UserId = table.Column<long>(type: "bigint", nullable: false),
|
|
ChatId = table.Column<long>(type: "bigint", nullable: false),
|
|
Value = table.Column<double>(type: "double", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_UserReputation", x => new { x.ChatId, x.UserId });
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_UserReputation_ChatId",
|
|
table: "UserReputation",
|
|
column: "ChatId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "UserReputation");
|
|
}
|
|
}
|
|
}
|