summaryrefslogtreecommitdiff
path: root/VPNAuth.Server/Migrations/20250418102156_DbInit.cs
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-04-18 12:25:59 +0200
committerTim <contact@bytim.eu>2025-04-18 12:25:59 +0200
commit4b2ad030fa381662f4b0c2464e97b0d2c5f6a716 (patch)
treedcc6af3136764322bd779110dcedd35e293d583c /VPNAuth.Server/Migrations/20250418102156_DbInit.cs
downloadVPNAuth-4b2ad030fa381662f4b0c2464e97b0d2c5f6a716.tar.xz
VPNAuth-4b2ad030fa381662f4b0c2464e97b0d2c5f6a716.zip
Initial commit
Diffstat (limited to 'VPNAuth.Server/Migrations/20250418102156_DbInit.cs')
-rw-r--r--VPNAuth.Server/Migrations/20250418102156_DbInit.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/VPNAuth.Server/Migrations/20250418102156_DbInit.cs b/VPNAuth.Server/Migrations/20250418102156_DbInit.cs
new file mode 100644
index 0000000..70967ca
--- /dev/null
+++ b/VPNAuth.Server/Migrations/20250418102156_DbInit.cs
@@ -0,0 +1,61 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace VPNAuth.Server.Migrations
+{
+ /// <inheritdoc />
+ public partial class DbInit : Migration
+ {
+ /// <inheritdoc />
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "AccessTokens",
+ columns: table => new
+ {
+ Id = table.Column<int>(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Token = table.Column<string>(type: "TEXT", nullable: false),
+ ClientId = table.Column<string>(type: "TEXT", nullable: false),
+ CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
+ Scopes = table.Column<string>(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AccessTokens", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AuthRequests",
+ columns: table => new
+ {
+ Id = table.Column<int>(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ InitTime = table.Column<DateTime>(type: "TEXT", nullable: false),
+ Code = table.Column<string>(type: "TEXT", nullable: false),
+ State = table.Column<string>(type: "TEXT", nullable: true),
+ ClientId = table.Column<string>(type: "TEXT", nullable: false),
+ Scopes = table.Column<string>(type: "TEXT", nullable: false),
+ CodeChallenge = table.Column<string>(type: "TEXT", nullable: false),
+ CodeChallengeMethod = table.Column<string>(type: "TEXT", nullable: false),
+ Accepted = table.Column<bool>(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AuthRequests", x => x.Id);
+ });
+ }
+
+ /// <inheritdoc />
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "AccessTokens");
+
+ migrationBuilder.DropTable(
+ name: "AuthRequests");
+ }
+ }
+}