#407 database migration

This commit is contained in:
Hamid Reza Mohammadi 2023-08-05 10:45:03 +03:30
parent 215931095d
commit 71875f77a4
4 changed files with 5320 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,95 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RMuseum.Migrations
{
/// <inheritdoc />
public partial class OCR : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "FullResolutionImageHeight",
table: "PDFPages",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "FullResolutionImageWidth",
table: "PDFPages",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<DateTime>(
name: "OCRTime",
table: "PDFPages",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<bool>(
name: "OCRed",
table: "PDFPages",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "PageText",
table: "PDFPages",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "OCRTime",
table: "PDFBooks",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<bool>(
name: "OCRed",
table: "PDFBooks",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "FullResolutionImageHeight",
table: "PDFPages");
migrationBuilder.DropColumn(
name: "FullResolutionImageWidth",
table: "PDFPages");
migrationBuilder.DropColumn(
name: "OCRTime",
table: "PDFPages");
migrationBuilder.DropColumn(
name: "OCRed",
table: "PDFPages");
migrationBuilder.DropColumn(
name: "PageText",
table: "PDFPages");
migrationBuilder.DropColumn(
name: "OCRTime",
table: "PDFBooks");
migrationBuilder.DropColumn(
name: "OCRed",
table: "PDFBooks");
}
}
}

View File

@ -3185,6 +3185,12 @@ namespace RMuseum.Migrations
b.Property<int?>("MultiVolumePDFCollectionId")
.HasColumnType("int");
b.Property<DateTime>("OCRTime")
.HasColumnType("datetime2");
b.Property<bool>("OCRed")
.HasColumnType("bit");
b.Property<string>("OriginalFileName")
.HasColumnType("nvarchar(max)");
@ -3268,15 +3274,30 @@ namespace RMuseum.Migrations
b.Property<string>("ExtenalThumbnailImageUrl")
.HasColumnType("nvarchar(max)");
b.Property<int>("FullResolutionImageHeight")
.HasColumnType("int");
b.Property<int>("FullResolutionImageWidth")
.HasColumnType("int");
b.Property<DateTime>("LastModified")
.HasColumnType("datetime2");
b.Property<DateTime>("OCRTime")
.HasColumnType("datetime2");
b.Property<bool>("OCRed")
.HasColumnType("bit");
b.Property<int>("PDFBookId")
.HasColumnType("int");
b.Property<int>("PageNumber")
.HasColumnType("int");
b.Property<string>("PageText")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("ThumbnailImageId")
.HasColumnType("uniqueidentifier");

View File

@ -3883,6 +3883,18 @@
<member name="M:RMuseum.Migrations.NaskbanLink.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Migrations.OCR">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.OCR.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.OCR.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.OCR.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
<summary>
donation expenditures