88 lines
2.7 KiB
C#
88 lines
2.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Mizuki.Database;
|
|
|
|
#nullable disable
|
|
|
|
namespace Mizuki.Migrations
|
|
{
|
|
[DbContext(typeof(MizukiDbContext))]
|
|
[Migration("20250112191512_Initial migration")]
|
|
partial class Initialmigration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "9.0.0");
|
|
|
|
modelBuilder.Entity("Mizuki.Database.Models.Upload", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("AuthorId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Filename")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("OriginalFilename")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long>("SizeInBytes")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTimeOffset>("TimeOfUpload")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AuthorId");
|
|
|
|
b.HasIndex("Filename")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Uploads");
|
|
});
|
|
|
|
modelBuilder.Entity("Mizuki.Database.Models.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("Mizuki.Database.Models.Upload", b =>
|
|
{
|
|
b.HasOne("Mizuki.Database.Models.User", "Author")
|
|
.WithMany()
|
|
.HasForeignKey("AuthorId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Author");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|