Files
Delta-v/Content.Server.Database/Migrations/Postgres/20260112180704_DVSeenTips.cs
T
Milonandpre-commit-ci[bot] e0fd0cb2cd tips / tutorial system (#5199)
* somewhat functional yes

* some cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* review

* missed one

* why not params…

* review 2

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-14 14:23:39 -06:00

51 lines
2.0 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class DVSeenTips : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "dv_seen_tips",
columns: table => new
{
dv_seen_tips_id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
player_user_id = table.Column<Guid>(type: "uuid", nullable: false),
tip_proto_id = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
dismissed_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_dv_seen_tips", x => x.dv_seen_tips_id);
table.ForeignKey(
name: "FK_dv_seen_tips_player_player_id",
column: x => x.player_user_id,
principalTable: "player",
principalColumn: "user_id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_dv_seen_tips_player_user_id_tip_proto_id",
table: "dv_seen_tips",
columns: new[] { "player_user_id", "tip_proto_id" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "dv_seen_tips");
}
}
}