using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace MTWireGuard.Application.Migrations { /// public partial class AddLastKnownTraffic : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ResetNotes", table: "DataUsages", type: "TEXT", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SystemReset", table: "DataUsages", type: "INTEGER", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "LastKnownTraffic", columns: table => new { UserID = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), RX = table.Column(type: "INTEGER", nullable: false), TX = table.Column(type: "INTEGER", nullable: false), CreationTime = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_LastKnownTraffic", x => x.UserID); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "LastKnownTraffic"); migrationBuilder.DropColumn( name: "ResetNotes", table: "DataUsages"); migrationBuilder.DropColumn( name: "SystemReset", table: "DataUsages"); } } }