Ignore:
Timestamp:
10/28/25 10:49:02 (11 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
4708118, ff202cf
Parents:
e49c3ed (diff), c155364 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Boris Gjorgjievski <69085722+imbrsk@…> (10/28/25 10:49:02)
git-committer:
GitHub <noreply@…> (10/28/25 10:49:02)
Message:

Merge pull request #5 from stefansaveski/feature/refresh-token

Feature/refresh token

File:
1 moved

Legend:

Unmodified
Added
Removed
  • iknow-api/Migrations/20251028091953_new.cs

    re49c3ed rc2e73b6  
    88{
    99    /// <inheritdoc />
    10     public partial class InitialCreate : Migration
     10    public partial class @new : Migration
    1111    {
    1212        /// <inheritdoc />
     
    3232                    table.PrimaryKey("PK_User", x => x.Id);
    3333                });
     34
     35            migrationBuilder.CreateTable(
     36                name: "RefreshToken",
     37                columns: table => new
     38                {
     39                    Id = table.Column<int>(type: "integer", nullable: false)
     40                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
     41                    UserId = table.Column<int>(type: "integer", nullable: false),
     42                    Token = table.Column<string>(type: "text", nullable: false),
     43                    ExpiresAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
     44                    IsValid = table.Column<bool>(type: "boolean", nullable: false)
     45                },
     46                constraints: table =>
     47                {
     48                    table.PrimaryKey("PK_RefreshToken", x => x.Id);
     49                    table.ForeignKey(
     50                        name: "FK_RefreshToken_User_UserId",
     51                        column: x => x.UserId,
     52                        principalTable: "User",
     53                        principalColumn: "Id",
     54                        onDelete: ReferentialAction.Cascade);
     55                });
     56
     57            migrationBuilder.CreateIndex(
     58                name: "IX_RefreshToken_UserId",
     59                table: "RefreshToken",
     60                column: "UserId");
    3461        }
    3562
     
    3865        {
    3966            migrationBuilder.DropTable(
     67                name: "RefreshToken");
     68
     69            migrationBuilder.DropTable(
    4070                name: "User");
    4171        }
Note: See TracChangeset for help on using the changeset viewer.