33 lines
993 B
C#
33 lines
993 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Moonlight.Api.Database.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddedValidUntilToApiKeys : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
name: "ValidUntil",
|
|
schema: "core",
|
|
table: "ApiKeys",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ValidUntil",
|
|
schema: "core",
|
|
table: "ApiKeys");
|
|
}
|
|
}
|
|
}
|