mirror of
https://github.com/bitwarden/server.git
synced 2024-12-05 14:23:30 +01:00
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace Bit.SqliteMigrations.Migrations;
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class DistributedCache : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Cache",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<string>(type: "TEXT", maxLength: 449, nullable: false),
|
|||
|
Value = table.Column<byte[]>(type: "BLOB", nullable: true),
|
|||
|
ExpiresAtTime = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|||
|
SlidingExpirationInSeconds = table.Column<long>(type: "INTEGER", nullable: true),
|
|||
|
AbsoluteExpiration = table.Column<DateTime>(type: "TEXT", nullable: true)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Cache", x => x.Id);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Cache_ExpiresAtTime",
|
|||
|
table: "Cache",
|
|||
|
column: "ExpiresAtTime");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Cache");
|
|||
|
}
|
|||
|
}
|