46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
namespace ManagerService.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class SeedSubscriptionPlans : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.InsertData(
|
|
table: "SubscriptionPlans",
|
|
columns: new[] { "Id", "AiRequestsPerMonth", "Name", "StorageQuotaBytes" },
|
|
values: new object[,]
|
|
{
|
|
{ "plan-premium", 500, "Premium", 53687091200L },
|
|
{ "plan-standard", 100, "Standard", 10737418240L },
|
|
{ "plan-starter", 0, "Starter", 1073741824L }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "SubscriptionPlans",
|
|
keyColumn: "Id",
|
|
keyValue: "plan-premium");
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "SubscriptionPlans",
|
|
keyColumn: "Id",
|
|
keyValue: "plan-standard");
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "SubscriptionPlans",
|
|
keyColumn: "Id",
|
|
keyValue: "plan-starter");
|
|
}
|
|
}
|
|
}
|