using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace WebAppServer1.Migrations { /// public partial class tokens : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Tokens", columns: table => new { Id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), RefreshToken = table.Column(type: "text", nullable: false), UserId = table.Column(type: "integer", nullable: false), UserName = table.Column(type: "text", nullable: false), IssuedAt = table.Column(type: "timestamp with time zone", nullable: false), ExpiresAt = table.Column(type: "timestamp with time zone", nullable: false), IsRevoked = table.Column(type: "boolean", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Tokens", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Tokens"); } } }