using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DorkNet.Server.Migrations { /// public partial class ExternalSignIn : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "DataProtectionKeys", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), FriendlyName = table.Column(type: "TEXT", nullable: true), Xml = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_DataProtectionKeys", x => x.Id); }); migrationBuilder.CreateTable( name: "ExternalLogins", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), PlayerId = table.Column(type: "INTEGER", nullable: false), Issuer = table.Column(type: "TEXT", nullable: false), Subject = table.Column(type: "TEXT", nullable: false), Email = table.Column(type: "TEXT", nullable: false), CreatedAt = table.Column(type: "TEXT", nullable: false), LastUsedAt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ExternalLogins", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_ExternalLogins_Issuer_Subject", table: "ExternalLogins", columns: new[] { "Issuer", "Subject" }, unique: true); migrationBuilder.CreateIndex( name: "IX_ExternalLogins_PlayerId", table: "ExternalLogins", column: "PlayerId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "DataProtectionKeys"); migrationBuilder.DropTable( name: "ExternalLogins"); } } }