🗃️ Enrich user profile on database

This commit is contained in:
2025-05-21 22:29:09 +08:00
parent 79fbbc283a
commit b0a616c17c
4 changed files with 3529 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
using Microsoft.EntityFrameworkCore.Migrations;
using NodaTime;
#nullable disable
namespace DysonNetwork.Sphere.Migrations
{
/// <inheritdoc />
public partial class EnrichAccountProfile : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Instant>(
name: "birthday",
table: "account_profiles",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "gender",
table: "account_profiles",
type: "character varying(1024)",
maxLength: 1024,
nullable: true);
migrationBuilder.AddColumn<Instant>(
name: "last_seen_at",
table: "account_profiles",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "pronouns",
table: "account_profiles",
type: "character varying(1024)",
maxLength: 1024,
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "birthday",
table: "account_profiles");
migrationBuilder.DropColumn(
name: "gender",
table: "account_profiles");
migrationBuilder.DropColumn(
name: "last_seen_at",
table: "account_profiles");
migrationBuilder.DropColumn(
name: "pronouns",
table: "account_profiles");
}
}
}

View File

@ -546,6 +546,10 @@ namespace DysonNetwork.Sphere.Migrations
.HasColumnType("character varying(4096)")
.HasColumnName("bio");
b.Property<Instant?>("Birthday")
.HasColumnType("timestamp with time zone")
.HasColumnName("birthday");
b.Property<Instant>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
@ -563,11 +567,20 @@ namespace DysonNetwork.Sphere.Migrations
.HasColumnType("character varying(256)")
.HasColumnName("first_name");
b.Property<string>("Gender")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("gender");
b.Property<string>("LastName")
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("last_name");
b.Property<Instant?>("LastSeenAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_seen_at");
b.Property<string>("MiddleName")
.HasMaxLength(256)
.HasColumnType("character varying(256)")
@ -578,6 +591,11 @@ namespace DysonNetwork.Sphere.Migrations
.HasColumnType("character varying(32)")
.HasColumnName("picture_id");
b.Property<string>("Pronouns")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("pronouns");
b.Property<Instant>("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");