diff --git a/Foxnouns.Backend/Database/Migrations/20240527132444_Init.Designer.cs b/Foxnouns.Backend/Database/Migrations/20240527132444_Init.Designer.cs
deleted file mode 100644
index 5274ef0..0000000
--- a/Foxnouns.Backend/Database/Migrations/20240527132444_Init.Designer.cs
+++ /dev/null
@@ -1,412 +0,0 @@
-//
-using Foxnouns.Backend.Database;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using NodaTime;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Foxnouns.Backend.Database.Migrations
-{
- [DbContext(typeof(DatabaseContext))]
- [Migration("20240527132444_Init")]
- partial class Init
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("AuthType")
- .HasColumnType("integer")
- .HasColumnName("auth_type");
-
- b.Property("FediverseApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("fediverse_application_id");
-
- b.Property("RemoteId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("remote_id");
-
- b.Property("RemoteUsername")
- .HasColumnType("text")
- .HasColumnName("remote_username");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_auth_methods");
-
- b.HasIndex("FediverseApplicationId")
- .HasDatabaseName("ix_auth_methods_fediverse_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_auth_methods_user_id");
-
- b.ToTable("auth_methods", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.FediverseApplication", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Domain")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("domain");
-
- b.Property("InstanceType")
- .HasColumnType("integer")
- .HasColumnName("instance_type");
-
- b.HasKey("Id")
- .HasName("pk_fediverse_applications");
-
- b.ToTable("fediverse_applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("Unlisted")
- .HasColumnType("boolean")
- .HasColumnName("unlisted");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_members");
-
- b.HasIndex("UserId", "Name")
- .IsUnique()
- .HasDatabaseName("ix_members_user_id_name");
-
- b.ToTable("members", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ExpiresAt")
- .HasColumnType("timestamp with time zone")
- .HasColumnName("expires_at");
-
- b.Property("ManuallyExpired")
- .HasColumnType("boolean")
- .HasColumnName("manually_expired");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_tokens");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_tokens_user_id");
-
- b.ToTable("tokens", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("MemberTitle")
- .HasColumnType("text")
- .HasColumnName("member_title");
-
- b.Property("Role")
- .HasColumnType("integer")
- .HasColumnName("role");
-
- b.Property("Username")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("username");
-
- b.HasKey("Id")
- .HasName("pk_users");
-
- b.HasIndex("Username")
- .IsUnique()
- .HasDatabaseName("ix_users_username");
-
- b.ToTable("users", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.FediverseApplication", "FediverseApplication")
- .WithMany()
- .HasForeignKey("FediverseApplicationId")
- .HasConstraintName("fk_auth_methods_fediverse_applications_fediverse_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("AuthMethods")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_auth_methods_users_user_id");
-
- b.Navigation("FediverseApplication");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("Members")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_members_users_user_id");
-
- b.OwnsOne("System.Collections.Generic.List", "Fields", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Names", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Pronouns", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_users_user_id");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Fields#List", "Fields", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Names#List", "Names", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Pronouns#List", "Pronouns", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Navigation("AuthMethods");
-
- b.Navigation("Members");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Foxnouns.Backend/Database/Migrations/20240527132444_Init.cs b/Foxnouns.Backend/Database/Migrations/20240527132444_Init.cs
index 4a876cf..f501fe0 100644
--- a/Foxnouns.Backend/Database/Migrations/20240527132444_Init.cs
+++ b/Foxnouns.Backend/Database/Migrations/20240527132444_Init.cs
@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Infrastructure;
using NodaTime;
#nullable disable
@@ -6,6 +7,8 @@ using NodaTime;
namespace Foxnouns.Backend.Database.Migrations
{
///
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240527132444_Init")]
public partial class Init : Migration
{
///
diff --git a/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.Designer.cs b/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.Designer.cs
deleted file mode 100644
index 2b660a0..0000000
--- a/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.Designer.cs
+++ /dev/null
@@ -1,470 +0,0 @@
-//
-using Foxnouns.Backend.Database;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using NodaTime;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Foxnouns.Backend.Database.Migrations
-{
- [DbContext(typeof(DatabaseContext))]
- [Migration("20240528125310_AddApplications")]
- partial class AddApplications
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Application", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("RedirectUris")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("redirect_uris");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.HasKey("Id")
- .HasName("pk_applications");
-
- b.ToTable("applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("AuthType")
- .HasColumnType("integer")
- .HasColumnName("auth_type");
-
- b.Property("FediverseApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("fediverse_application_id");
-
- b.Property("RemoteId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("remote_id");
-
- b.Property("RemoteUsername")
- .HasColumnType("text")
- .HasColumnName("remote_username");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_auth_methods");
-
- b.HasIndex("FediverseApplicationId")
- .HasDatabaseName("ix_auth_methods_fediverse_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_auth_methods_user_id");
-
- b.ToTable("auth_methods", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.FediverseApplication", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Domain")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("domain");
-
- b.Property("InstanceType")
- .HasColumnType("integer")
- .HasColumnName("instance_type");
-
- b.HasKey("Id")
- .HasName("pk_fediverse_applications");
-
- b.ToTable("fediverse_applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("Unlisted")
- .HasColumnType("boolean")
- .HasColumnName("unlisted");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_members");
-
- b.HasIndex("UserId", "Name")
- .IsUnique()
- .HasDatabaseName("ix_members_user_id_name");
-
- b.ToTable("members", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("application_id");
-
- b.Property("ExpiresAt")
- .HasColumnType("timestamp with time zone")
- .HasColumnName("expires_at");
-
- b.Property("Hash")
- .IsRequired()
- .HasColumnType("bytea")
- .HasColumnName("hash");
-
- b.Property("ManuallyExpired")
- .HasColumnType("boolean")
- .HasColumnName("manually_expired");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_tokens");
-
- b.HasIndex("ApplicationId")
- .HasDatabaseName("ix_tokens_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_tokens_user_id");
-
- b.ToTable("tokens", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("MemberTitle")
- .HasColumnType("text")
- .HasColumnName("member_title");
-
- b.Property("Role")
- .HasColumnType("integer")
- .HasColumnName("role");
-
- b.Property("Username")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("username");
-
- b.HasKey("Id")
- .HasName("pk_users");
-
- b.HasIndex("Username")
- .IsUnique()
- .HasDatabaseName("ix_users_username");
-
- b.ToTable("users", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.FediverseApplication", "FediverseApplication")
- .WithMany()
- .HasForeignKey("FediverseApplicationId")
- .HasConstraintName("fk_auth_methods_fediverse_applications_fediverse_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("AuthMethods")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_auth_methods_users_user_id");
-
- b.Navigation("FediverseApplication");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("Members")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_members_users_user_id");
-
- b.OwnsOne("System.Collections.Generic.List", "Fields", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Names", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Pronouns", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.Application", "Application")
- .WithMany()
- .HasForeignKey("ApplicationId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_applications_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_users_user_id");
-
- b.Navigation("Application");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Fields#List", "Fields", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Names#List", "Names", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Pronouns#List", "Pronouns", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Navigation("AuthMethods");
-
- b.Navigation("Members");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.cs b/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.cs
index d6694cd..d8486f4 100644
--- a/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.cs
+++ b/Foxnouns.Backend/Database/Migrations/20240528125310_AddApplications.cs
@@ -1,10 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Infrastructure;
#nullable disable
namespace Foxnouns.Backend.Database.Migrations
{
///
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240528125310_AddApplications")]
public partial class AddApplications : Migration
{
///
diff --git a/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.Designer.cs b/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.Designer.cs
deleted file mode 100644
index 07d8181..0000000
--- a/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.Designer.cs
+++ /dev/null
@@ -1,474 +0,0 @@
-//
-using Foxnouns.Backend.Database;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using NodaTime;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Foxnouns.Backend.Database.Migrations
-{
- [DbContext(typeof(DatabaseContext))]
- [Migration("20240528145744_AddListHidden")]
- partial class AddListHidden
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Application", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("RedirectUris")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("redirect_uris");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.HasKey("Id")
- .HasName("pk_applications");
-
- b.ToTable("applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("AuthType")
- .HasColumnType("integer")
- .HasColumnName("auth_type");
-
- b.Property("FediverseApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("fediverse_application_id");
-
- b.Property("RemoteId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("remote_id");
-
- b.Property("RemoteUsername")
- .HasColumnType("text")
- .HasColumnName("remote_username");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_auth_methods");
-
- b.HasIndex("FediverseApplicationId")
- .HasDatabaseName("ix_auth_methods_fediverse_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_auth_methods_user_id");
-
- b.ToTable("auth_methods", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.FediverseApplication", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Domain")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("domain");
-
- b.Property("InstanceType")
- .HasColumnType("integer")
- .HasColumnName("instance_type");
-
- b.HasKey("Id")
- .HasName("pk_fediverse_applications");
-
- b.ToTable("fediverse_applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("Unlisted")
- .HasColumnType("boolean")
- .HasColumnName("unlisted");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_members");
-
- b.HasIndex("UserId", "Name")
- .IsUnique()
- .HasDatabaseName("ix_members_user_id_name");
-
- b.ToTable("members", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("application_id");
-
- b.Property("ExpiresAt")
- .HasColumnType("timestamp with time zone")
- .HasColumnName("expires_at");
-
- b.Property("Hash")
- .IsRequired()
- .HasColumnType("bytea")
- .HasColumnName("hash");
-
- b.Property("ManuallyExpired")
- .HasColumnType("boolean")
- .HasColumnName("manually_expired");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_tokens");
-
- b.HasIndex("ApplicationId")
- .HasDatabaseName("ix_tokens_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_tokens_user_id");
-
- b.ToTable("tokens", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("ListHidden")
- .HasColumnType("boolean")
- .HasColumnName("list_hidden");
-
- b.Property("MemberTitle")
- .HasColumnType("text")
- .HasColumnName("member_title");
-
- b.Property("Role")
- .HasColumnType("integer")
- .HasColumnName("role");
-
- b.Property("Username")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("username");
-
- b.HasKey("Id")
- .HasName("pk_users");
-
- b.HasIndex("Username")
- .IsUnique()
- .HasDatabaseName("ix_users_username");
-
- b.ToTable("users", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.FediverseApplication", "FediverseApplication")
- .WithMany()
- .HasForeignKey("FediverseApplicationId")
- .HasConstraintName("fk_auth_methods_fediverse_applications_fediverse_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("AuthMethods")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_auth_methods_users_user_id");
-
- b.Navigation("FediverseApplication");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("Members")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_members_users_user_id");
-
- b.OwnsOne("System.Collections.Generic.List", "Fields", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Names", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Pronouns", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.Application", "Application")
- .WithMany()
- .HasForeignKey("ApplicationId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_applications_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_users_user_id");
-
- b.Navigation("Application");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Fields#List", "Fields", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Names#List", "Names", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Pronouns#List", "Pronouns", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Navigation("AuthMethods");
-
- b.Navigation("Members");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.cs b/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.cs
index 1b40552..aa9483c 100644
--- a/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.cs
+++ b/Foxnouns.Backend/Database/Migrations/20240528145744_AddListHidden.cs
@@ -1,10 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Infrastructure;
#nullable disable
namespace Foxnouns.Backend.Database.Migrations
{
///
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240528145744_AddListHidden")]
public partial class AddListHidden : Migration
{
///
diff --git a/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.Designer.cs b/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.Designer.cs
deleted file mode 100644
index 2c92566..0000000
--- a/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.Designer.cs
+++ /dev/null
@@ -1,478 +0,0 @@
-//
-using Foxnouns.Backend.Database;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using NodaTime;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Foxnouns.Backend.Database.Migrations
-{
- [DbContext(typeof(DatabaseContext))]
- [Migration("20240604142522_AddPassword")]
- partial class AddPassword
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Application", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("RedirectUris")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("redirect_uris");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.HasKey("Id")
- .HasName("pk_applications");
-
- b.ToTable("applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("AuthType")
- .HasColumnType("integer")
- .HasColumnName("auth_type");
-
- b.Property("FediverseApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("fediverse_application_id");
-
- b.Property("RemoteId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("remote_id");
-
- b.Property("RemoteUsername")
- .HasColumnType("text")
- .HasColumnName("remote_username");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_auth_methods");
-
- b.HasIndex("FediverseApplicationId")
- .HasDatabaseName("ix_auth_methods_fediverse_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_auth_methods_user_id");
-
- b.ToTable("auth_methods", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.FediverseApplication", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Domain")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("domain");
-
- b.Property("InstanceType")
- .HasColumnType("integer")
- .HasColumnName("instance_type");
-
- b.HasKey("Id")
- .HasName("pk_fediverse_applications");
-
- b.ToTable("fediverse_applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("Unlisted")
- .HasColumnType("boolean")
- .HasColumnName("unlisted");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_members");
-
- b.HasIndex("UserId", "Name")
- .IsUnique()
- .HasDatabaseName("ix_members_user_id_name");
-
- b.ToTable("members", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("application_id");
-
- b.Property("ExpiresAt")
- .HasColumnType("timestamp with time zone")
- .HasColumnName("expires_at");
-
- b.Property("Hash")
- .IsRequired()
- .HasColumnType("bytea")
- .HasColumnName("hash");
-
- b.Property("ManuallyExpired")
- .HasColumnType("boolean")
- .HasColumnName("manually_expired");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_tokens");
-
- b.HasIndex("ApplicationId")
- .HasDatabaseName("ix_tokens_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_tokens_user_id");
-
- b.ToTable("tokens", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("ListHidden")
- .HasColumnType("boolean")
- .HasColumnName("list_hidden");
-
- b.Property("MemberTitle")
- .HasColumnType("text")
- .HasColumnName("member_title");
-
- b.Property("Password")
- .HasColumnType("text")
- .HasColumnName("password");
-
- b.Property("Role")
- .HasColumnType("integer")
- .HasColumnName("role");
-
- b.Property("Username")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("username");
-
- b.HasKey("Id")
- .HasName("pk_users");
-
- b.HasIndex("Username")
- .IsUnique()
- .HasDatabaseName("ix_users_username");
-
- b.ToTable("users", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.FediverseApplication", "FediverseApplication")
- .WithMany()
- .HasForeignKey("FediverseApplicationId")
- .HasConstraintName("fk_auth_methods_fediverse_applications_fediverse_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("AuthMethods")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_auth_methods_users_user_id");
-
- b.Navigation("FediverseApplication");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany("Members")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_members_users_user_id");
-
- b.OwnsOne("System.Collections.Generic.List", "Fields", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Names", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.OwnsOne("System.Collections.Generic.List", "Pronouns", b1 =>
- {
- b1.Property("MemberId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("MemberId");
-
- b1.ToTable("members");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("MemberId")
- .HasConstraintName("fk_members_members_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.HasOne("Foxnouns.Backend.Database.Models.Application", "Application")
- .WithMany()
- .HasForeignKey("ApplicationId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_applications_application_id");
-
- b.HasOne("Foxnouns.Backend.Database.Models.User", "User")
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired()
- .HasConstraintName("fk_tokens_users_user_id");
-
- b.Navigation("Application");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Fields#List", "Fields", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("fields");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Names#List", "Names", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("names");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.OwnsOne("Foxnouns.Backend.Database.Models.User.Pronouns#List", "Pronouns", b1 =>
- {
- b1.Property("UserId")
- .HasColumnType("bigint");
-
- b1.Property("Capacity")
- .HasColumnType("integer");
-
- b1.HasKey("UserId")
- .HasName("pk_users");
-
- b1.ToTable("users");
-
- b1.ToJson("pronouns");
-
- b1.WithOwner()
- .HasForeignKey("UserId")
- .HasConstraintName("fk_users_users_user_id");
- });
-
- b.Navigation("Fields")
- .IsRequired();
-
- b.Navigation("Names")
- .IsRequired();
-
- b.Navigation("Pronouns")
- .IsRequired();
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Navigation("AuthMethods");
-
- b.Navigation("Members");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.cs b/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.cs
index 23671a8..02add03 100644
--- a/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.cs
+++ b/Foxnouns.Backend/Database/Migrations/20240604142522_AddPassword.cs
@@ -1,10 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Infrastructure;
#nullable disable
namespace Foxnouns.Backend.Database.Migrations
{
///
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240604142522_AddPassword")]
public partial class AddPassword : Migration
{
///
diff --git a/Foxnouns.Backend/Database/Migrations/20240611225328_AddTemporaryKeyCache.Designer.cs b/Foxnouns.Backend/Database/Migrations/20240611225328_AddTemporaryKeyCache.Designer.cs
deleted file mode 100644
index af4f52a..0000000
--- a/Foxnouns.Backend/Database/Migrations/20240611225328_AddTemporaryKeyCache.Designer.cs
+++ /dev/null
@@ -1,511 +0,0 @@
-//
-using Foxnouns.Backend.Database;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using NodaTime;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Foxnouns.Backend.Database.Migrations
-{
- [DbContext(typeof(DatabaseContext))]
- [Migration("20240611225328_AddTemporaryKeyCache")]
- partial class AddTemporaryKeyCache
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Application", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("RedirectUris")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("redirect_uris");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.HasKey("Id")
- .HasName("pk_applications");
-
- b.ToTable("applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.AuthMethod", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("AuthType")
- .HasColumnType("integer")
- .HasColumnName("auth_type");
-
- b.Property("FediverseApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("fediverse_application_id");
-
- b.Property("RemoteId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("remote_id");
-
- b.Property("RemoteUsername")
- .HasColumnType("text")
- .HasColumnName("remote_username");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_auth_methods");
-
- b.HasIndex("FediverseApplicationId")
- .HasDatabaseName("ix_auth_methods_fediverse_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_auth_methods_user_id");
-
- b.ToTable("auth_methods", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.FediverseApplication", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ClientId")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_id");
-
- b.Property("ClientSecret")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("client_secret");
-
- b.Property("Domain")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("domain");
-
- b.Property("InstanceType")
- .HasColumnType("integer")
- .HasColumnName("instance_type");
-
- b.HasKey("Id")
- .HasName("pk_fediverse_applications");
-
- b.ToTable("fediverse_applications", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Member", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property("Bio")
- .HasColumnType("text")
- .HasColumnName("bio");
-
- b.Property("DisplayName")
- .HasColumnType("text")
- .HasColumnName("display_name");
-
- b.Property("Links")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("links");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("name");
-
- b.Property("Unlisted")
- .HasColumnType("boolean")
- .HasColumnName("unlisted");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_members");
-
- b.HasIndex("UserId", "Name")
- .IsUnique()
- .HasDatabaseName("ix_members_user_id_name");
-
- b.ToTable("members", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.TemporaryKey", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("Expires")
- .HasColumnType("timestamp with time zone")
- .HasColumnName("expires");
-
- b.Property("Key")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("key");
-
- b.Property("Value")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("value");
-
- b.HasKey("Id")
- .HasName("pk_temporary_keys");
-
- b.HasIndex("Key")
- .IsUnique()
- .HasDatabaseName("ix_temporary_keys_key");
-
- b.ToTable("temporary_keys", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.Token", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("ApplicationId")
- .HasColumnType("bigint")
- .HasColumnName("application_id");
-
- b.Property("ExpiresAt")
- .HasColumnType("timestamp with time zone")
- .HasColumnName("expires_at");
-
- b.Property("Hash")
- .IsRequired()
- .HasColumnType("bytea")
- .HasColumnName("hash");
-
- b.Property("ManuallyExpired")
- .HasColumnType("boolean")
- .HasColumnName("manually_expired");
-
- b.Property("Scopes")
- .IsRequired()
- .HasColumnType("text[]")
- .HasColumnName("scopes");
-
- b.Property("UserId")
- .HasColumnType("bigint")
- .HasColumnName("user_id");
-
- b.HasKey("Id")
- .HasName("pk_tokens");
-
- b.HasIndex("ApplicationId")
- .HasDatabaseName("ix_tokens_application_id");
-
- b.HasIndex("UserId")
- .HasDatabaseName("ix_tokens_user_id");
-
- b.ToTable("tokens", (string)null);
- });
-
- modelBuilder.Entity("Foxnouns.Backend.Database.Models.User", b =>
- {
- b.Property("Id")
- .HasColumnType("bigint")
- .HasColumnName("id");
-
- b.Property("Avatar")
- .HasColumnType("text")
- .HasColumnName("avatar");
-
- b.Property