mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-29 22:29:24 +02:00
58 lines
1.6 KiB
C#
58 lines
1.6 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace MTWireGuard.Application.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class ExpireField : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.AlterColumn<string>(
|
|||
|
name: "Name",
|
|||
|
table: "Users",
|
|||
|
type: "TEXT",
|
|||
|
nullable: true,
|
|||
|
oldClrType: typeof(string),
|
|||
|
oldType: "TEXT");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<DateTime>(
|
|||
|
name: "Expire",
|
|||
|
table: "Users",
|
|||
|
type: "TEXT",
|
|||
|
nullable: true);
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "ExpireID",
|
|||
|
table: "Users",
|
|||
|
type: "INTEGER",
|
|||
|
nullable: true);
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "Expire",
|
|||
|
table: "Users");
|
|||
|
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "ExpireID",
|
|||
|
table: "Users");
|
|||
|
|
|||
|
migrationBuilder.AlterColumn<string>(
|
|||
|
name: "Name",
|
|||
|
table: "Users",
|
|||
|
type: "TEXT",
|
|||
|
nullable: false,
|
|||
|
defaultValue: "",
|
|||
|
oldClrType: typeof(string),
|
|||
|
oldType: "TEXT",
|
|||
|
oldNullable: true);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|