54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace LightlessSyncServer.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddUserVanityFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "has_vanity",
|
|
table: "users",
|
|
type: "boolean",
|
|
nullable: true,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "text_color_hex",
|
|
table: "users",
|
|
type: "character varying(9)",
|
|
maxLength: 9,
|
|
nullable: true,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "text_glow_color_hex",
|
|
table: "users",
|
|
type: "character varying(9)",
|
|
maxLength: 9,
|
|
nullable: true,
|
|
defaultValue: "");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "has_vanity",
|
|
table: "users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "text_color_hex",
|
|
table: "users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "text_glow_color_hex",
|
|
table: "users");
|
|
}
|
|
}
|
|
}
|