﻿BEGIN TRANSACTION;
GO

DECLARE @var0 sysname;
SELECT @var0 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[CompanyOperatingCosts]') AND [c].[name] = N'AdminOverheadPercentage');
IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [CompanyOperatingCosts] DROP CONSTRAINT [' + @var0 + '];');
ALTER TABLE [CompanyOperatingCosts] DROP COLUMN [AdminOverheadPercentage];
GO

DECLARE @var1 sysname;
SELECT @var1 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[CompanyOperatingCosts]') AND [c].[name] = N'ElectricityRatePerKwh');
IF @var1 IS NOT NULL EXEC(N'ALTER TABLE [CompanyOperatingCosts] DROP CONSTRAINT [' + @var1 + '];');
ALTER TABLE [CompanyOperatingCosts] DROP COLUMN [ElectricityRatePerKwh];
GO

DECLARE @var2 sysname;
SELECT @var2 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[CompanyOperatingCosts]') AND [c].[name] = N'FacilityCostPercentage');
IF @var2 IS NOT NULL EXEC(N'ALTER TABLE [CompanyOperatingCosts] DROP CONSTRAINT [' + @var2 + '];');
ALTER TABLE [CompanyOperatingCosts] DROP COLUMN [FacilityCostPercentage];
GO

DECLARE @var3 sysname;
SELECT @var3 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[CompanyOperatingCosts]') AND [c].[name] = N'GasRatePerUnit');
IF @var3 IS NOT NULL EXEC(N'ALTER TABLE [CompanyOperatingCosts] DROP CONSTRAINT [' + @var3 + '];');
ALTER TABLE [CompanyOperatingCosts] DROP COLUMN [GasRatePerUnit];
GO

DECLARE @var4 sysname;
SELECT @var4 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[CompanyOperatingCosts]') AND [c].[name] = N'OvertimeLaborRate');
IF @var4 IS NOT NULL EXEC(N'ALTER TABLE [CompanyOperatingCosts] DROP CONSTRAINT [' + @var4 + '];');
ALTER TABLE [CompanyOperatingCosts] DROP COLUMN [OvertimeLaborRate];
GO

DECLARE @var5 sysname;
SELECT @var5 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[CompanyOperatingCosts]') AND [c].[name] = N'SpecializedLaborRate');
IF @var5 IS NOT NULL EXEC(N'ALTER TABLE [CompanyOperatingCosts] DROP CONSTRAINT [' + @var5 + '];');
ALTER TABLE [CompanyOperatingCosts] DROP COLUMN [SpecializedLaborRate];
GO

EXEC sp_rename N'[CompanyOperatingCosts].[WaterRatePerUnit]', N'RushChargeFixedAmount', N'COLUMN';
GO

ALTER TABLE [CompanyOperatingCosts] ADD [RushChargeType] nvarchar(20) NOT NULL DEFAULT N'Percentage';
GO

UPDATE [PricingTiers] SET [CreatedAt] = '2026-02-11T19:55:20.0897507Z'
WHERE [Id] = 1;
SELECT @@ROWCOUNT;

GO

UPDATE [PricingTiers] SET [CreatedAt] = '2026-02-11T19:55:20.0897511Z'
WHERE [Id] = 2;
SELECT @@ROWCOUNT;

GO

UPDATE [PricingTiers] SET [CreatedAt] = '2026-02-11T19:55:20.0897513Z'
WHERE [Id] = 3;
SELECT @@ROWCOUNT;

GO

INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'20260211195523_UpdateOperatingCostsRushCharge', N'8.0.11');
GO

COMMIT;
GO

