Updated admin page to be more streamlined and added the beginning of the blogging features
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace OpenArchival.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedViewCountObject : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ArtifactGroupingViewCounts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ArtifactGroupingId = table.Column<int>(type: "integer", nullable: false),
|
||||
Views = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ArtifactGroupingViewCounts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ArtifactGroupingViewCounts_ArtifactGroupings_ArtifactGroupi~",
|
||||
column: x => x.ArtifactGroupingId,
|
||||
principalTable: "ArtifactGroupings",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ArtifactGroupingViewCounts_ArtifactGroupingId",
|
||||
table: "ArtifactGroupingViewCounts",
|
||||
column: "ArtifactGroupingId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ArtifactGroupingViewCounts");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user