1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Files
server/src/Sql/Billing/dbo/Tables/ProviderInvoiceItem.sql
Alex Morask 0496085c39 [AC-2551] Consolidated Billing Migration (#4616)
* Move existing Billing SQL files into dbo folder

I noticed that every other team had a nested dbo folder under their team folder while Billing did not. This change replicates that.

* Add SQL files for ClientOrganizationMigrationRecord table

* Add SQL Server migration for ClientOrganizationMigrationRecord table

* Add ClientOrganizationMigrationRecord entity and repository interface

* Add ClientOrganizationMigrationRecord Dapper repository

* Add ClientOrganizationMigrationRecord EF repository

* Add EF migrations for ClientOrganizationMigrationRecord table

* Implement migration process

* Wire up new Admin tool to migrate providers

* Run dotnet format

* Updated coupon and credit application per product request

* AC-3057-3058: Fix expiration date and enabled from webhook processing

* Run dotnet format

* AC-3059: Fix assigned seats during migration

* Updated AllocatedSeats in the case plan already exists

* Update migration scripts to reflect current date
2024-10-04 10:55:00 -04:00

16 lines
715 B
Transact-SQL

CREATE TABLE [dbo].[ProviderInvoiceItem] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[ProviderId] UNIQUEIDENTIFIER NOT NULL,
[InvoiceId] VARCHAR (50) NOT NULL,
[InvoiceNumber] VARCHAR (50) NULL,
[ClientName] NVARCHAR (50) NOT NULL,
[PlanName] NVARCHAR (50) NOT NULL,
[AssignedSeats] INT NOT NULL,
[UsedSeats] INT NOT NULL,
[Total] MONEY NOT NULL,
[Created] DATETIME2 (7) NOT NULL,
[ClientId] UNIQUEIDENTIFIER NULL,
CONSTRAINT [PK_ProviderInvoiceItem] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_ProviderInvoiceItem_Provider] FOREIGN KEY ([ProviderId]) REFERENCES [dbo].[Provider] ([Id]) ON DELETE CASCADE
);