using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PowderCoating.Infrastructure.Migrations { /// public partial class AddTimeclockSettings : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "TimeclockKioskToken", table: "Companies"); migrationBuilder.AddColumn( name: "TimeclockAllowMultiplePunchesPerDay", table: "Companies", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "TimeclockAutoClockOutHours", table: "Companies", type: "int", nullable: true); migrationBuilder.AddColumn( name: "TimeclockEnabled", table: "Companies", type: "bit", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "TimeclockKioskDevices", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DeviceName = table.Column(type: "nvarchar(max)", nullable: true), Token = table.Column(type: "nvarchar(450)", nullable: false), ActivatedAt = table.Column(type: "datetime2", nullable: false), LastSeenAt = table.Column(type: "datetime2", nullable: true), CompanyId = table.Column(type: "int", nullable: false), CreatedAt = table.Column(type: "datetime2", nullable: false), UpdatedAt = table.Column(type: "datetime2", nullable: true), CreatedBy = table.Column(type: "nvarchar(max)", nullable: true), UpdatedBy = table.Column(type: "nvarchar(max)", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false), DeletedAt = table.Column(type: "datetime2", nullable: true), DeletedBy = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_TimeclockKioskDevices", x => x.Id); }); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 1, column: "CreatedAt", value: new DateTime(2026, 5, 27, 4, 18, 51, 784, DateTimeKind.Utc).AddTicks(3772)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 2, column: "CreatedAt", value: new DateTime(2026, 5, 27, 4, 18, 51, 784, DateTimeKind.Utc).AddTicks(3777)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 3, column: "CreatedAt", value: new DateTime(2026, 5, 27, 4, 18, 51, 784, DateTimeKind.Utc).AddTicks(3779)); migrationBuilder.CreateIndex( name: "IX_TimeclockKioskDevices_CompanyId", table: "TimeclockKioskDevices", column: "CompanyId"); migrationBuilder.CreateIndex( name: "IX_TimeclockKioskDevices_Token", table: "TimeclockKioskDevices", column: "Token", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "TimeclockKioskDevices"); migrationBuilder.DropColumn( name: "TimeclockAllowMultiplePunchesPerDay", table: "Companies"); migrationBuilder.DropColumn( name: "TimeclockAutoClockOutHours", table: "Companies"); migrationBuilder.DropColumn( name: "TimeclockEnabled", table: "Companies"); migrationBuilder.AddColumn( name: "TimeclockKioskToken", table: "Companies", type: "nvarchar(max)", nullable: true); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 1, column: "CreatedAt", value: new DateTime(2026, 5, 26, 22, 10, 37, 196, DateTimeKind.Utc).AddTicks(4791)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 2, column: "CreatedAt", value: new DateTime(2026, 5, 26, 22, 10, 37, 196, DateTimeKind.Utc).AddTicks(4801)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 3, column: "CreatedAt", value: new DateTime(2026, 5, 26, 22, 10, 37, 196, DateTimeKind.Utc).AddTicks(4803)); } } }