Files
Delta-v/Content.Server.Database/Migrations/Sqlite/20260112180647_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

50 lines
1.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
/// <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("Sqlite:Autoincrement", true),
player_user_id = table.Column<Guid>(type: "TEXT", nullable: false),
tip_proto_id = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
dismissed_at = table.Column<DateTime>(type: "TEXT", 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");
}
}
}