using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Lumina.DataAccess.Common.Migrations { /// public partial class AddsUserSettingsTable : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "UserSettings", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), UserId = table.Column(type: "TEXT", nullable: false), IsPaginationEnabled = table.Column(type: "INTEGER", nullable: false), ItemsPerPage = table.Column(type: "INTEGER", nullable: false), IgnoreThePrefixForAlphaPicker = table.Column(type: "INTEGER", nullable: false), CreatedOnUtc = table.Column(type: "TEXT", nullable: false), CreatedBy = table.Column(type: "TEXT", nullable: false), UpdatedOnUtc = table.Column(type: "TEXT", nullable: true), UpdatedBy = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_UserSettings", x => x.Id); table.ForeignKey( name: "FK_UserSettings_Users_UserId", column: x => x.UserId, principalTable: "Users", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_UserSettings_UserId", table: "UserSettings", column: "UserId", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "UserSettings"); } } }