mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03:22:04 -04:00
49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace KfChatDotNetBot.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Images : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "ValueType",
|
|
table: "Settings",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Images",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
Key = table.Column<string>(type: "TEXT", nullable: false),
|
|
Url = table.Column<string>(type: "TEXT", nullable: false),
|
|
LastSeen = table.Column<DateTimeOffset>(type: "TEXT", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Images", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Images");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ValueType",
|
|
table: "Settings");
|
|
}
|
|
}
|
|
}
|