continuity/Continuity.AuthServer/DB/Migrations/20230814114414_Initial.cs

27 lines
1.1 KiB
C#
Raw Normal View History

2024-02-07 15:40:36 +00:00
// Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
2023-11-20 18:58:30 +00:00
2023-08-14 11:49:48 +00:00
#nullable disable
2023-10-12 07:15:34 +00:00
namespace Server.DB.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
/// <inheritdoc />
public partial class Initial : Migration {
2023-08-14 11:49:48 +00:00
/// <inheritdoc />
2023-10-12 07:15:34 +00:00
protected override void Up(MigrationBuilder migrationBuilder) => migrationBuilder.CreateTable(
name: "Accounts",
columns: table => new {
2023-10-12 07:15:34 +00:00
Id = table.Column<Guid>(type: "uuid", nullable: false),
Username = table.Column<string>(type: "varchar(20)", nullable: false),
Password = table.Column<byte[]>(type: "bytea", nullable: false),
Email = table.Column<string>(type: "text", nullable: false),
PermissionLevel = table.Column<byte>(type: "smallint", nullable: false),
Salt = table.Column<byte[]>(type: "bytea", nullable: false)
},
constraints: table => table.PrimaryKey("PK_Accounts", x => x.Id));
2023-08-14 11:49:48 +00:00
2023-10-12 07:15:34 +00:00
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable(
name: "Accounts");
2023-08-14 11:49:48 +00:00
}