Skip to content

Commit

Permalink
feat: support for nested tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeBurrito committed Aug 20, 2024
1 parent 5de6f81 commit 1e71e62
Show file tree
Hide file tree
Showing 19 changed files with 966 additions and 31 deletions.
178 changes: 178 additions & 0 deletions Migrations/20240820095346_ParentAndSubtags.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions Migrations/20240820095346_ParentAndSubtags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace WomensWiki.Migrations
{
/// <inheritdoc />
public partial class ParentAndSubtags : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "ParentTagId",
table: "Tags",
type: "uniqueidentifier",
nullable: true);

migrationBuilder.CreateIndex(
name: "IX_Tags_ParentTagId",
table: "Tags",
column: "ParentTagId");

migrationBuilder.AddForeignKey(
name: "FK_Tags_Tags_ParentTagId",
table: "Tags",
column: "ParentTagId",
principalTable: "Tags",
principalColumn: "Id");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Tags_Tags_ParentTagId",
table: "Tags");

migrationBuilder.DropIndex(
name: "IX_Tags_ParentTagId",
table: "Tags");

migrationBuilder.DropColumn(
name: "ParentTagId",
table: "Tags");
}
}
}
Loading

0 comments on commit 1e71e62

Please sign in to comment.