Changeset 4e061d8 for iknow-api/Migrations/20251027140958_refreshtoken.cs
- Timestamp:
- 10/27/25 15:22:39 (11 months ago)
- Branches:
- master
- Children:
- 1e58098
- Parents:
- 5eb7847
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
iknow-api/Migrations/20251027140958_refreshtoken.cs
r5eb7847 r4e061d8 8 8 { 9 9 /// <inheritdoc /> 10 public partial class InitialCreate: Migration10 public partial class refreshtoken : Migration 11 11 { 12 12 /// <inheritdoc /> … … 32 32 table.PrimaryKey("PK_User", x => x.Id); 33 33 }); 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"); 34 61 } 35 62 … … 38 65 { 39 66 migrationBuilder.DropTable( 67 name: "RefreshToken"); 68 69 migrationBuilder.DropTable( 40 70 name: "User"); 41 71 }
Note:
See TracChangeset
for help on using the changeset viewer.
