Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class AddMetaGarbage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "meta_garbage",
columns: table => new
{
meta_garbage_id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
map_prototype = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
data = table.Column<string>(type: "text", nullable: false),
map_version = table.Column<int>(type: "integer", nullable: false),
saved_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_meta_garbage", x => x.meta_garbage_id);
});

migrationBuilder.CreateIndex(
name: "IX_meta_garbage_map_prototype",
table: "meta_garbage",
column: "map_prototype",
unique: true);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "meta_garbage");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,44 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("mentor_help_tickets", (string)null);
});

modelBuilder.Entity("Content.Server.Database.MetaGarbageEntry", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("meta_garbage_id");

NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

b.Property<string>("Data")
.IsRequired()
.HasColumnType("text")
.HasColumnName("data");

b.Property<string>("MapPrototype")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("map_prototype");

b.Property<int>("MapVersion")
.HasColumnType("integer")
.HasColumnName("map_version");

b.Property<DateTime>("SavedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("saved_at");

b.HasKey("Id")
.HasName("PK_meta_garbage");

b.HasIndex("MapPrototype")
.IsUnique()
.HasDatabaseName("IX_meta_garbage_map_prototype");

b.ToTable("meta_garbage", (string)null);
});

modelBuilder.Entity("Content.Server.Database.PlayTime", b =>
{
b.Property<int>("Id")
Expand Down
Loading
Loading