forked from mtusi2026/mtusi2026lab2
30 lines
786 B
C#
30 lines
786 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Messenger.Api.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddChatLastMessageAt : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
name: "last_message_at",
|
|
table: "chats",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "last_message_at",
|
|
table: "chats");
|
|
}
|
|
}
|
|
}
|