summaryrefslogtreecommitdiff
path: root/VPNAuth.Server/Migrations
diff options
context:
space:
mode:
Diffstat (limited to 'VPNAuth.Server/Migrations')
-rw-r--r--VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.Designer.cs123
-rw-r--r--VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.cs40
-rw-r--r--VPNAuth.Server/Migrations/DatabaseModelSnapshot.cs32
3 files changed, 195 insertions, 0 deletions
diff --git a/VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.Designer.cs b/VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.Designer.cs
new file mode 100644
index 0000000..d71b594
--- /dev/null
+++ b/VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.Designer.cs
@@ -0,0 +1,123 @@
+// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using VPNAuth.Server.Database;
+
+#nullable disable
+
+namespace VPNAuth.Server.Migrations
+{
+ [DbContext(typeof(Database.Database))]
+ [Migration("20250419101300_AddUserInformationTable")]
+ partial class AddUserInformationTable
+ {
+ /// <inheritdoc />
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "9.0.4");
+
+ modelBuilder.Entity("VPNAuth.Server.Database.AccessToken", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("ClientId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.PrimitiveCollection<string>("Scopes")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Token")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("AccessTokens");
+ });
+
+ modelBuilder.Entity("VPNAuth.Server.Database.AuthRequest", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("Accepted")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("ClientId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Code")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("CodeChallenge")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("CodeChallengeMethod")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("InitTime")
+ .HasColumnType("TEXT");
+
+ b.PrimitiveCollection<string>("Scopes")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("State")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("AuthRequests");
+ });
+
+ modelBuilder.Entity("VPNAuth.Server.Database.UserInformation", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Email")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("FamilyName")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("GivenName")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Picture")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PreferredUsername")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Sub")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("UserInformation");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.cs b/VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.cs
new file mode 100644
index 0000000..9d20a99
--- /dev/null
+++ b/VPNAuth.Server/Migrations/20250419101300_AddUserInformationTable.cs
@@ -0,0 +1,40 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace VPNAuth.Server.Migrations
+{
+ /// <inheritdoc />
+ public partial class AddUserInformationTable : Migration
+ {
+ /// <inheritdoc />
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "UserInformation",
+ columns: table => new
+ {
+ Id = table.Column<int>(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Sub = table.Column<string>(type: "TEXT", nullable: true),
+ Name = table.Column<string>(type: "TEXT", nullable: true),
+ GivenName = table.Column<string>(type: "TEXT", nullable: true),
+ FamilyName = table.Column<string>(type: "TEXT", nullable: true),
+ PreferredUsername = table.Column<string>(type: "TEXT", nullable: true),
+ Email = table.Column<string>(type: "TEXT", nullable: true),
+ Picture = table.Column<string>(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_UserInformation", x => x.Id);
+ });
+ }
+
+ /// <inheritdoc />
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "UserInformation");
+ }
+ }
+}
diff --git a/VPNAuth.Server/Migrations/DatabaseModelSnapshot.cs b/VPNAuth.Server/Migrations/DatabaseModelSnapshot.cs
index d735267..e4643df 100644
--- a/VPNAuth.Server/Migrations/DatabaseModelSnapshot.cs
+++ b/VPNAuth.Server/Migrations/DatabaseModelSnapshot.cs
@@ -82,6 +82,38 @@ namespace VPNAuth.Server.Migrations
b.ToTable("AuthRequests");
});
+
+ modelBuilder.Entity("VPNAuth.Server.Database.UserInformation", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Email")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("FamilyName")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("GivenName")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Picture")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PreferredUsername")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Sub")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("UserInformation");
+ });
#pragma warning restore 612, 618
}
}