mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
d39f45c81c
* Add autoscale fields to Organization * Add autoscale setting changes * Autoscale organizations updates InviteUsersAsync to support all invite sources. sends an email to org owners when organization autoscaled * All organizations autoscale Disabling autoscaling can be done by setting max seats to current seats. We only warn about autoscaling on the first autoscaling event. * Fix tests * Bug fixes * Simplify subscription update logic * Void invoices that fail to delete Stripe no longer allows deletion of draft invoices that were created as part of subscription updates. It's necessary to void out these invoices without sending tem to the client. * Notify org owners when their subscription runs out of seats * Use datetime for notifications Allows for later re-sending email if we want to periodically remind owners * Do not update subscription if it already matches new quatity * Include all migrations * Remove unnecessary inline styling * SubscriptionUpdate handles update decisions * Remove unnecessary html setter * PR review * Use minimum access for class methods
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Bit.MySqlMigrations.Migrations
|
|
{
|
|
public partial class AddMaxAutoscaleSeatsToOrganization : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "MaxAutoscaleSeats",
|
|
table: "Organization",
|
|
type: "int",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "OwnersNotifiedOfAutoscaling",
|
|
table: "Organization",
|
|
type: "datetime(6)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "ProviderOrganizationId",
|
|
table: "Event",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "MaxAutoscaleSeats",
|
|
table: "Organization");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OwnersNotifiedOfAutoscaling",
|
|
table: "Organization");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ProviderOrganizationId",
|
|
table: "Event");
|
|
}
|
|
}
|
|
}
|