forked from EllieBotDevs/elliebot
43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace EllieBot.Migrations.Mysql
|
|||
|
{
|
|||
|
public partial class bank : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "bankusers",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
id = table.Column<int>(type: "int", nullable: false)
|
|||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|||
|
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|||
|
balance = table.Column<long>(type: "bigint", nullable: false),
|
|||
|
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("pk_bankusers", x => x.id);
|
|||
|
})
|
|||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "ix_bankusers_userid",
|
|||
|
table: "bankusers",
|
|||
|
column: "userid",
|
|||
|
unique: true);
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "bankusers");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|