mirror of
https://github.com/bitwarden/server.git
synced 2026-02-04 02:05:30 -06:00
Fix the build Lint
This commit is contained in:
parent
7335ab6e90
commit
283e079189
@ -1,63 +1,61 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Bit.MySqlMigrations.Migrations
|
namespace Bit.MySqlMigrations.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddSubscriptionDiscountTable : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class AddSubscriptionDiscountTable : Migration
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
migrationBuilder.CreateTable(
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
name: "SubscriptionDiscount",
|
||||||
{
|
columns: table => new
|
||||||
migrationBuilder.CreateTable(
|
{
|
||||||
name: "SubscriptionDiscount",
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
columns: table => new
|
StripeCouponId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
||||||
{
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
StripeProductIds = table.Column<string>(type: "longtext", nullable: true)
|
||||||
StripeCouponId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
PercentOff = table.Column<decimal>(type: "decimal(65,30)", nullable: true),
|
||||||
StripeProductIds = table.Column<string>(type: "longtext", nullable: true)
|
AmountOff = table.Column<long>(type: "bigint", nullable: true),
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
Currency = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true)
|
||||||
PercentOff = table.Column<decimal>(type: "decimal(65,30)", nullable: true),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
AmountOff = table.Column<long>(type: "bigint", nullable: true),
|
Duration = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
|
||||||
Currency = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true)
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
DurationInMonths = table.Column<int>(type: "int", nullable: true),
|
||||||
Duration = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
|
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
DurationInMonths = table.Column<int>(type: "int", nullable: true),
|
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
|
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
AudienceType = table.Column<int>(type: "int", nullable: false),
|
||||||
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
RevisionDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||||
AudienceType = table.Column<int>(type: "int", nullable: false),
|
},
|
||||||
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
constraints: table =>
|
||||||
RevisionDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
{
|
||||||
},
|
table.PrimaryKey("PK_SubscriptionDiscount", x => x.Id);
|
||||||
constraints: table =>
|
})
|
||||||
{
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
table.PrimaryKey("PK_SubscriptionDiscount", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_SubscriptionDiscount_DateRange",
|
name: "IX_SubscriptionDiscount_DateRange",
|
||||||
table: "SubscriptionDiscount",
|
table: "SubscriptionDiscount",
|
||||||
columns: new[] { "StartDate", "EndDate" });
|
columns: new[] { "StartDate", "EndDate" });
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_SubscriptionDiscount_StripeCouponId",
|
name: "IX_SubscriptionDiscount_StripeCouponId",
|
||||||
table: "SubscriptionDiscount",
|
table: "SubscriptionDiscount",
|
||||||
column: "StripeCouponId",
|
column: "StripeCouponId",
|
||||||
unique: true);
|
unique: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "SubscriptionDiscount");
|
name: "SubscriptionDiscount");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,57 +1,55 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Bit.PostgresMigrations.Migrations
|
namespace Bit.PostgresMigrations.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddSubscriptionDiscountTable : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class AddSubscriptionDiscountTable : Migration
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
migrationBuilder.CreateTable(
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
name: "SubscriptionDiscount",
|
||||||
{
|
columns: table => new
|
||||||
migrationBuilder.CreateTable(
|
{
|
||||||
name: "SubscriptionDiscount",
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||||
columns: table => new
|
StripeCouponId = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
|
||||||
{
|
StripeProductIds = table.Column<string>(type: "text", nullable: true),
|
||||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
PercentOff = table.Column<decimal>(type: "numeric", nullable: true),
|
||||||
StripeCouponId = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
|
AmountOff = table.Column<long>(type: "bigint", nullable: true),
|
||||||
StripeProductIds = table.Column<string>(type: "text", nullable: true),
|
Currency = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: true),
|
||||||
PercentOff = table.Column<decimal>(type: "numeric", nullable: true),
|
Duration = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
|
||||||
AmountOff = table.Column<long>(type: "bigint", nullable: true),
|
DurationInMonths = table.Column<int>(type: "integer", nullable: true),
|
||||||
Currency = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: true),
|
Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
|
||||||
Duration = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
|
StartDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
DurationInMonths = table.Column<int>(type: "integer", nullable: true),
|
EndDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
|
AudienceType = table.Column<int>(type: "integer", nullable: false),
|
||||||
StartDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
EndDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
RevisionDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||||
AudienceType = table.Column<int>(type: "integer", nullable: false),
|
},
|
||||||
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
constraints: table =>
|
||||||
RevisionDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
{
|
||||||
},
|
table.PrimaryKey("PK_SubscriptionDiscount", x => x.Id);
|
||||||
constraints: table =>
|
});
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SubscriptionDiscount", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_SubscriptionDiscount_DateRange",
|
name: "IX_SubscriptionDiscount_DateRange",
|
||||||
table: "SubscriptionDiscount",
|
table: "SubscriptionDiscount",
|
||||||
columns: new[] { "StartDate", "EndDate" });
|
columns: new[] { "StartDate", "EndDate" });
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_SubscriptionDiscount_StripeCouponId",
|
name: "IX_SubscriptionDiscount_StripeCouponId",
|
||||||
table: "SubscriptionDiscount",
|
table: "SubscriptionDiscount",
|
||||||
column: "StripeCouponId",
|
column: "StripeCouponId",
|
||||||
unique: true);
|
unique: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "SubscriptionDiscount");
|
name: "SubscriptionDiscount");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,57 +1,55 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Bit.SqliteMigrations.Migrations
|
namespace Bit.SqliteMigrations.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddSubscriptionDiscountTable : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class AddSubscriptionDiscountTable : Migration
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
migrationBuilder.CreateTable(
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
name: "SubscriptionDiscount",
|
||||||
{
|
columns: table => new
|
||||||
migrationBuilder.CreateTable(
|
{
|
||||||
name: "SubscriptionDiscount",
|
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||||
columns: table => new
|
StripeCouponId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
||||||
{
|
StripeProductIds = table.Column<string>(type: "TEXT", nullable: true),
|
||||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
PercentOff = table.Column<decimal>(type: "TEXT", nullable: true),
|
||||||
StripeCouponId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
AmountOff = table.Column<long>(type: "INTEGER", nullable: true),
|
||||||
StripeProductIds = table.Column<string>(type: "TEXT", nullable: true),
|
Currency = table.Column<string>(type: "TEXT", maxLength: 10, nullable: true),
|
||||||
PercentOff = table.Column<decimal>(type: "TEXT", nullable: true),
|
Duration = table.Column<string>(type: "TEXT", maxLength: 20, nullable: false),
|
||||||
AmountOff = table.Column<long>(type: "INTEGER", nullable: true),
|
DurationInMonths = table.Column<int>(type: "INTEGER", nullable: true),
|
||||||
Currency = table.Column<string>(type: "TEXT", maxLength: 10, nullable: true),
|
Name = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
|
||||||
Duration = table.Column<string>(type: "TEXT", maxLength: 20, nullable: false),
|
StartDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||||
DurationInMonths = table.Column<int>(type: "INTEGER", nullable: true),
|
EndDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||||
Name = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
|
AudienceType = table.Column<int>(type: "INTEGER", nullable: false),
|
||||||
StartDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||||
EndDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
RevisionDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||||
AudienceType = table.Column<int>(type: "INTEGER", nullable: false),
|
},
|
||||||
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
constraints: table =>
|
||||||
RevisionDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
{
|
||||||
},
|
table.PrimaryKey("PK_SubscriptionDiscount", x => x.Id);
|
||||||
constraints: table =>
|
});
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SubscriptionDiscount", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_SubscriptionDiscount_DateRange",
|
name: "IX_SubscriptionDiscount_DateRange",
|
||||||
table: "SubscriptionDiscount",
|
table: "SubscriptionDiscount",
|
||||||
columns: new[] { "StartDate", "EndDate" });
|
columns: new[] { "StartDate", "EndDate" });
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_SubscriptionDiscount_StripeCouponId",
|
name: "IX_SubscriptionDiscount_StripeCouponId",
|
||||||
table: "SubscriptionDiscount",
|
table: "SubscriptionDiscount",
|
||||||
column: "StripeCouponId",
|
column: "StripeCouponId",
|
||||||
unique: true);
|
unique: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "SubscriptionDiscount");
|
name: "SubscriptionDiscount");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user