From 6cde2e527d063ed9f3cdf6e3e6fede47a7b403bc Mon Sep 17 00:00:00 2001 From: Peter Tandrup <71757561+prtandrup@users.noreply.github.com> Date: Fri, 18 Nov 2022 15:02:14 +0100 Subject: [PATCH] Revert: remove charge history table from main (#1874) Due to an issue with the CD job ApplyDatabaseMigrations, it was necessary to revert PR1872. Once the CD issue is fixed, the ChargeHistory table will be added again. --- ...rgyHub.Charges.ApplyDBMigrationsApp.csproj | 1 - ...2211171330 Create Charge History table.sql | 46 ------------------- 2 files changed, 47 deletions(-) delete mode 100644 source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/Scripts/Model/202211171330 Create Charge History table.sql diff --git a/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/GreenEnergyHub.Charges.ApplyDBMigrationsApp.csproj b/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/GreenEnergyHub.Charges.ApplyDBMigrationsApp.csproj index a60b6691e4..6d4e89dfeb 100644 --- a/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/GreenEnergyHub.Charges.ApplyDBMigrationsApp.csproj +++ b/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/GreenEnergyHub.Charges.ApplyDBMigrationsApp.csproj @@ -56,7 +56,6 @@ limitations under the License. - diff --git a/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/Scripts/Model/202211171330 Create Charge History table.sql b/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/Scripts/Model/202211171330 Create Charge History table.sql deleted file mode 100644 index d14691fb06..0000000000 --- a/source/GreenEnergyHub.Charges/source/GreenEnergyHub.Charges.ApplyDBMigrationsApp/Scripts/Model/202211171330 Create Charge History table.sql +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------------------------------------------------------------------- --- ChargesQuery Schema ------------------------------------------------------------------------------------------------------------------------- - -IF NOT EXISTS ( SELECT * - FROM sys.schemas - WHERE name = N'ChargesQuery' ) - EXEC('CREATE SCHEMA [ChargesQuery]'); -GO - ------------------------------------------------------------------------------------------------------------------------- --- Create ChargeHistory table ------------------------------------------------------------------------------------------------------------------------- - -CREATE TABLE [ChargesQuery].[ChargeHistory]( - [Id] [uniqueidentifier] NOT NULL, - [SenderProvidedChargeId] [nvarchar](35) NOT NULL, - [Type] [int] NOT NULL, - [Owner] [nvarchar](35) NOT NULL, - [Name] [nvarchar](132) NOT NULL, - [Description] [nvarchar](2048) NOT NULL, - [Resolution] [int] NOT NULL, - [TaxIndicator] [bit] NOT NULL, - [TransparentInvoicing] [bit] NOT NULL, - [VatClassification] [int] NOT NULL, - [StartDateTime] [datetime2](7) NOT NULL, - [EndDateTime] [datetime2](7) NOT NULL, - [AcceptedDateTime] [datetime2](7) NOT NULL, - CONSTRAINT [PK_ChargeHistory] PRIMARY KEY NONCLUSTERED -( -[Id] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - ) ON [PRIMARY] - GO - ------------------------------------------------------------------------------------------------------------------------- --- Add index ------------------------------------------------------------------------------------------------------------------------- - -CREATE NONCLUSTERED INDEX [I1_SenderProvidedChargeId_Type_Owner] ON [ChargesQuery].[ChargeHistory] -( - [SenderProvidedChargeId] ASC, - [Type] ASC, - [Owner] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO \ No newline at end of file